First, welcome to the forum, second, that's not much description to go off of.
How many miles? Has it ever acted up before? Was it running good before this happened? Do you have any way to check codes?
First guess would be a cam sensor issue. This is very common on these trucks. Normally you would crank it while watching if the tach moves but on an 02 it won't show rpm during cranking. You will need to try and check codes on it. Other wise this is really just going to be a guessing game. If it has a logged p0340 code suspect the cam sensor and replace it.
Other thing to check is fuel pressure. Do you hear the fuel pump coming on when you key on? Try draining the fuel filter housing and remove the fuel filter. Have someone turn the key on and watch to see if it's filling up the fuel filter housing. It should fill the bowl up rather quick.
Is the wait to start light coming on when you first turn the key on?