If this is during the 2002.5-to-2003 changeover from the JTEC (Jeep-Truck Engine Controller) to NGC (Next Generation Controller), the swap will be more difficult and parts will have to be retrofitted to match what system the truck has. Avoid changing over the system if you can by finding the right engine.
The engine sales code for JTEC is NZC and the NGC sales code is NZD.
You need to determine which system your truck has first.
As long as your vehicle has an automatic transmission, the JTEC PCM should have 3 connectors and the NGC have 4 connectors?:
JTEC (SBEC): 81M4R-QGZBL._SL1500_.jpg
The sales codes should be found on an underhood tag or emissions label. It can also be looked up with the VIN.