RepairPal Certified shops can diagnose and repair your 2002 Nissan Xterra. They provide transparent pricing with a minimum 12-month or 12,000-mile warranty on repairs and services.
Im positive the Quest engine will ‘FIT’ into the Xterra...
You did not ask what it will take to allow the engine to be operational.
You need to contact local salvage dealer as they have the ultimate interchange program - HOLLANDER.
It is NOT a plug and play engine swap - that is fact! Good luck!