You (likely) need to have the front diff regeared to match the ratio in the rear. Can’t simply swap the Titan rear. If it has 3.36 diffs (tow package) and you’ve got a 3.36 rear already, you’re golden - but that would be a pretty serendipitous combo. From my research, the rear axle would need spring perches and shock mounts welded on; then figure out the rear driveshaft. It may be as simple as a hybrid u-joint but not many people have converted to the Titan rear end so your best info will come from lots of junk yard cruising, measuring and parts catalog searching. The ABS reluctor count is the same on the Xterra and Titan - so I imagine the frontier is the same as well. Wheels need the 6x5.5 bolt pattern but you’re getting much better brakes for your effort.
I considered a donor Titan for my Xterra VK56 conversion but abandoned the idea because I didn’t have enough time to make it work. I’d love to see some resourceful fellow get it done though!