You need the transfer case for a 20002 Ford F150, manual shift. (BW 4406). The manual shifted transfercase is an easier option than trying to retrofit an electrically shifted transfercase. Don't get me wrong, it is possible to rewire your rig to use the electric transfercase, but the manual one would be easier IMO.
You need the shifter, the linkage, weather boot, beauty boot, bolts from the side of the transmission, EVERYTHING associated with the shifter, if they have it or you can get it.
Reason why I say 2002 150 is that this year has a much smaller list of transfercases for the BW4406.
To be able to swap in the 5.0 into your Ranger, it would be easier to buy a V8 explorer/mountaineer (possible to get one totalled?) because you will need the wiring harnesses, the ECM and sensors.
I strongly suggest you
click here to read the threads on the rangerpowersports V8 swap area. This has been done many times by the guys over there, and there is a great question/answer section. Absolutely required reading to do the V8 swap into a Ranger. From what I understand the easiest combination to do is the 99-2001 Ranger with a 1999-2001 V8 Explorer or Mountaineer. Again, study up on this before diving in.
As a side note: there are 2 manual shift BW4406's in St. Louis that have less than 45,000 miles and can be had for $250 each. Thats a steal! Call Liberty Auto Parts @ 1-800-952-8514 . Stock # 5214V has 18,000 miles
and Stock # 85943 has 44,000 miles. Thats hard to beat!