1st gen Xterras are solid trucks, and can go a long, long way when maintained (timing chain!). Their Achilles heel is that the engine does not produce much power, unless you opt for the supercharged version.
2nd gen Xterras are very good trucks but you need to ensure that precautions have been taken to prevent the Strawberry Milkshake of Death - the mixing of coolant in the transmission as there is a poor design where an internal coolant line may crack and allow the mingling of fluids... I had this happen to my 2006 Xterra. It. can be expensive to fix, but the trucks are otherwise very solid platforms.
I sold my Xterra and got a Jeep JK Unlimited Rubicon, largely for the fun factor and aftermarket support.
The Nissan community is filled with helpful folks who are very approachable and willing to help out someone willing to learn.