I just did the same swap with a 96 5.2 also. I bought a 242 from craigslist with the same length output with the right spline count but the input had a spacer inside. needless to say i had to crack it apart and remove the spacer from the input. good thing i did cause the plastic inserts on one of the forks were gone.
For Sale: 91 YJ Sahara 4.0, 5 spd, 33x12.5x16 Pro Comp AT's, 4" lift, rear slip yoke eliminator, rear disc conversion, dual Optimas, Borla header cat-back, Tuffy console.
96 ZJ Laredo, all stock, 4.0, auto, 4x4 & 96 ZJ Limited, all stock 5.2, auto, 4x4 242 swapped in