There are two possible troublespots, though, it is most likely to be this one: low transmission fluid. It sounds as if your Xterra has a case of low-fluiditis (pardon the pun) and little more, though, if you don’t fix this problem you will likely have something far worse in the near future.
Assuming this is the case, which it most likely is, the problem is that your transmission’s fluid level is down only slightly, say half-a-quart or so. You can easily remedy this problem by adding new transmission fluid (check your owner’s manual for the correct part number; each automaker uses a special transmission fluid for its own automatics) in the proper amount and no more. Too much transmission fluid raises pressure and all kinds of havoc with the tranny.
To get a precise fluid level, just follow these steps:
1. Park on a flat area
2. Set the parking brake
3. Start or restart the Xterra and let it run for 20 minutes to achieve operating temperature (alternatively you can drive for 15 minutes)
4. Holding the brake for added safety put your Xterra in gear and run it through each gear for a moment to assure proper fluid infiltration in the transmission
5. Find and remove the transmission fluid dipstick
6. Clean it and reinsert it into the automatic transmission fluid filler neck (where you removed it)
7. Remove the dipstick again, taking are to do it with as straight a motion as possible (to prevent smudging the sample)
8. Read the fluid level, using the HOT marks (there are two sets; HOT is preferred); chances are you will see it down slightly
9. Slowly add fluid to the transmission through the filler neck taking care to check often to be sure you are not overfilling. On reaching the full line, stop
10. Replace the dipstick and you are finished with this task
As you can see, it is an easy task. It just requires a little steadiness and patience. You will achieve your result.
The other area that might be troublesome, and which spells a large bill, is the torque converter. From the description you give, though, this is unlikely.