Couldn't you just swap in the SOHC 4.0? I know that engine was available in the Exlorer in '98, did it come in the Ranger as well? If so, I would imagine it would be easier to swap it in than reworking the wiring and all for the 5.0, especially since the SOHC 4.0 has very similar power numbers to the 5.0 truck engine.
Just a thought...
Just a thought...