you also need to change the carrier iirc, which means replacing the carrier bearings and resetting the carrier preload and backlash, but at least you know the pinion depth is already set right so it's easier. This only applies to converting a 27 to a 29 spline, if it's already 29 spline toss it in and run it.
If the donor is a 96, you can't tell whether it's 27 or 29 spline without popping the cover and checking. If it's 97 or later it should be 29 spline. Your driveshaft needs to be an inch shorter than stock to make things line up with the 8.25, you can't use the one from the donor IF it is a 96 or later due to the new transfer case output shaft design however. If it is a 96 or later donor get a driveshaft from any 95 or earlier 8.25 equipped 4.0/auto/4wd XJ, or if you plan to lift it 3-5 inches, use your stock shaft since the extra length will compensate for the lift.