I know that the ECMs are the same. If the mounts match up I would go for it.
The 6 cylinder 3.3 liter engine is the same in both the 2000 and 2004 Xterra. The engine changed completely the next year in 2005.
The transmission for the xterra and frontier are the same, but they are different from a pathfinder. Tailshaft is different.
The 2013 Nissan Xterra has a V6 engine.
The 2009 Nissan Xterra has a V6 engine.
The 2011 Nissan Xterra has a V6 engine.
The 2010 Nissan Xterra has a V6 engine.
The 2014 Nissan Xterra has a V6 engine.
The 2008 Nissan Xterra has a V6 engine.
The 2005 Nissan Xterra has a V6 engine.
The 2012 Nissan Xterra has a V6 engine.
The 2007 Nissan Xterra has a V6 engine.
The 2002 Nissan Xterra has an inline 4 engine.