An XJ has the Aiain-Warner AW4 box, which is electronically controlled, so you need to have the transmission control module from the same vehicle, plus you have to make up the wiring harness and link it to the engine control module to make it work. That's in addition to the mounting and driveshaft issues.
Easier to try and get the whole lot from a '96-'02 auto TJ, as the 32RH 'box fitted to these is pureley hydraulic, so will bolt right in and work. Remember to plug the breather hole behind the torque converter and make a new breather on top of the housing before you fit it, though.