With the truck running, try wiggling (aggresively) the main wiring harness where it comes up from behind the engine near the valve cover. It will be a 2 inch or so wrap of cabling snaking up in that general area. Really give it a yank and tug around and see if you notice any change in the running. If so, there is a multi-ground junction inside this harness and you either need to CAREFULLY open then harness up and find that ground junction and clean it up and resolder the connection point or have the shop do it.
Failing that to produce any results, see if there is a 2 wire sensor (it's been a long time and I can't remember the years this applies to...) on the underside of the air cleaner housing. I'm thinking one wire is green and the other is yellow. See if that wiring has been stretched and may have a wire nearly broken in half.
Let us know what you find and good luck. Those are the 2 things that pop into mind first on the 4 cylinder model.
i did take the truck to nissan back in 03. It had a rough idle. They thought it might have been the main wiring ground. Ended up being the idle speed control unit. That i replaced after paying them 99.99 for nothing.
MotorsForum website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.