In my opinion, the KJ is much better...and I speak this not only because I have one, but from experience.
I test drove a 2003 Xterra the morning I bought my Jeep (the Nissan dealer was last on my list, even though I pretty much made up my mind the night before on the KJ). It was slow, bluky, and drove like crap.....and I was considering the SUPERCHARGED version (and i'm glad I didn't go with it, as the supercharged V6 runs on premium....and at $3.49+ a gallon.....well you do the math).
The newer ones are supposed to be better, and they have a bigger engine in them. But the 1st and 2nd generation Xterras are WAY under powered. This might be because they share the same engine with the Frontier, which probably weighs less than the X does....so while the engine may suit the Frontier well, it doesn't do the X much at all.