When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission. Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.
You need this -
It is intended to be replaced as a unit but technically speaking, there is nothing that says you cannot replace just broken studs but as you found out, you need to remove the wheel bearing unit as an assembly first. If it were my truck, I would replace the whole unit and I would not try a junk yard find as there is no way to determine it's real condition. This particular part can be had around $320 which is a lot but it is a pretty critical component.
To replace it, remove the outer three (I think-going off memory) bolts that hold the Ford 4x4 hub on and it will pull out as an assembly. Remove the snap ring inside, remove the caliper and bracket, unbolt the four bolts on the backside of the knuckle which hold the unit bearing in and then it will come out as an assembly. It is relatively easy. If you have ESOF, you do not have to do anything with the complicated two piece vaccum seal - this unit bearing sits in front of it. Also, unlike GM and many others, there is no big nut on the end of the stub shaft to torque. The stub shaft just passes through and is held in place by the large snap ring. The only special tool you need is a heavy duty pair of snap ring pliers that reach far enough in to get the snap ring off.