Since you don't know the condition of the donor, you need to at the very least do a compression check. But if it were me I would pull the heads after I first pulled the engine, and if the cylinders looked good, pull the oil pan. Working on it outside the truck is much easier with it on an engine stand. You can visually check the heads yourself, or have them checked and/or rebuilt at a machine shop. With the oil pan off, check the condition of the bottom end. It wouldn't hurt to check the bearings while you're in there. If it all checks out, replace the rear main seal, and put a fresh oil pump in it, and make sure you torque everything to spec as described in the manual. Then replace all the other seals and gaskets. That engine could be good, or could be crap, but you have no idea until you check it.