don't rule out a blown hose, instead of radiator. Sounds like something happened to the cooling system, overheated blowing the head gasket.
Do you plan on swapping motor and tranny or just the motor? If just the motor, you need to make sure the ECU and TCU talk to each other. IIRC, something changed in 98 on the tranny side. Obviously your best bet is to find a 98 4.0L. Over the years, sensors and/or jsut the connectors changed. I know this because I put a 95 motor in my 91 XJ with a 97 AW4.