The parts you need are:
- Front drive shaft, either CV style (if your axle has a yoke that is round and has 6 bolt holes in it) or U-joint style if you've got a regular 4-hole yoke. Parts from 5.2 do interchange, as far as I know.
- Left/right axle shafts, either CV style or u-joint style (depends on what you'd prefer, CV joints are smoother but u-joints are more robust) with ABS tone rings. They interchange between most jeeps with D30 front axle.
Chances are, you'd need a transfer case rebuild/swap, as they are known to have viscous coupling fail at 150k+ miles, and possibly a diff rebuild. That could both be reasons why the previous owner pulled the parts.