Get the whole truck
Seeing that you have a 2001, my advice, having been there and done that, is to get the same year explorer wrecked. Mine was a '99-'99 swap. You'll need the engine and associated stuff (accessories, etc), transmission, transfer case, front driveshaft, (maybe the rear too, it's been so long since I've done mine that I can't remember), the engine harness, the PATS module and key cylinder, the motor mounts, and the transmission cooler (if going with automatic, like I did). One thing for perspective- if you have the SOHC 4.0, you could swap the manual from the same year with far less complication and end up with essentially the same stock horsepower and torque. It will be lighter and the transfer cases will bolt up, and be similar amounts of fun as the v8. Obviously the top end with the v8 is far higher, as the 5.0 has tons of aftermarket support. Also, another perspective is that the automatic behind the 5.0 is a far better transmission than anything they ever put in a Ranger. I've been quite happy with mine (though I do miss rowing gears).