I have done this MANY times.
Easiest way is to find a wrecked, blowed up, or otherwise cheap 4wd donor rig so you can get everything you need. Other than that, finding a wrecking yard with late model XJ's isn't too hard.
You will need '97+ 4wd AW4 transmission and transfer case. Although earlier transfer cases can be used, getting the one from the same donor as trans. ensures you get the correct spline count, input length, etc. You will also need all of the shift linkage parts, including what's bolted to the transmission AND the one bolted to the under side of the body, under the carpet. You will want the t-case shifter, console trim piece, and shift bezel for t-case from donor as well.
Front axles are interchangable. Suspension, steering, etc. are all identical between 2wd and 4wd. Obviously you will need front and rear driveshafts as well. You will want a donor from any '91+ auto tranmission rig, to ensure the same 3.54 gear ratio. If your rig has a D35, it means it also has ABS. If you wish to keep your ABS functional, you will need a late model ABS front axle. If you have the 8.25 rear axle, it means you have no ABS and makes life easier.
Only thing not addressed is making the 4wd shift light in the dash work, but I've never worried about it, and that involves getting the donor wiring harness, PCM, etc.
I think that should cover it. Feel free to ask any more questions. I've converted 6 or 7 of these, two of 'em being late model ('97+) body style. My current '96 shop rig is a former 2wd rig also.
John