4.0L SOHC w/5R55
Use the 2WD Ranger harness if you can find one, or use the harness that came on the engine and trans you have.
The biggest problem you will have will be with the PATS, passive anti-thief system. The PCM needs to get a PATS command "OK" before it will actually go to normal operational mode. SO, if you have a donor vehicle, get the PATS module, wiring, the key transponder, and the keys!
These engines and trans are basically the same from 1997 to 2001 with minor differences in the intakes for some applications. This effects the coil mounting and plug wires. Early units have aluminum cam covers, then switched to plastic. The 4x4 engines have a balance shaft under the crank, 2WD engines do not. It is needed to offset NVH in the transfer case.
Check the VIN for donor vehicle with a dealer to see if the cam chain recall has been done. If not, do it before you install the engine. Dealer has a kit.
Make certain you use a trans cooler with the 5R55.