1996-2001 XJ Cherokee would be a direct swap. Anything older than that and you'll need to change the yoke on the driveshaft. Make sure you match up the input spline count -- easiest way is to just make sure the donor vehicle used the same trans (ie: auto or manual) as yours.
TJ transfer cases will work as well, but may have different spline counts and they are clocked differently than an XJ t'case. I'm not sure if the difference in clocking is due to the bolt pattern on the t'case or on the transmission though.
I'm curious about what kind of vibration issue is necessitating replacing the transfer case though?
Jason West - Jeepin.com | JeepinOutfitters.com '09 JKUR, RE 3.5", 37" GY MT/R-Ks, Expedition One bumpers, T&T rockers & skids, XRC10 Comp '95 XJ, RE 5.5", 35" MT/Rs, D30 w/hubs & ARB, D44 w/Detroit, 4.56s, C4x4 bumpers, etc, etc. '00 TJ, SOLD, wife's, RE 4.5" long-arm, 35" MT/Rs, D30+OX, D44+ARB, 4.88s, full cage, winch, C4x4 & Jeeperman bumpers, etc, etc.