I did it to my '87 MJ, and some others have done the conversion to their XJ/MJ's here on the board. I can't help ya with the tranny issue 'cause I stayed the same with mine (AX5), but I can tell you the swap is fairly straightforward. You'll need a 4WD tranny, TC, front axle with matching r&p to the rear, a front DS, the complete TC linkage with shifter, and either a new rear DS or you can have your 2WD one cut down. You'll also need a new speedo cable, as the 4WD one is longer than the 2WD one because it attaches to the tailcone of the TC rather than the 2WD extension housing on the trans. Beware, there are 2 different types of cable ends on the speedo cables where they attach to the speedometer....one is a flared end that is held by a spring-clip on the back of the speedo, and the other is a molded plastic piece that has an integrated clip. Look at the screws that attach the speedometer face to the gauge cluster (they are either phillips or staight head). If both speedos have the same screw heads, the cables "should" be the same. IIRC, the phillips head indicates the plastic-type clip end and the straight head is the flared metal end, but I'm not 100% sure on that.
Hit me back channel if ya have any swap questions other than the tranny issue....
HTH,
Jeff