Sounds like the IAC valve isn't opening. When you try to start the truck, the IAC valve should open to allow air in your engine to ignite. When it doesn't open and the butterfly in the throttle body isn't open, there is almost no air coming in! That's why when you hit the gas it fires right up.
Others feel free to chime in right here but this seems like a classic case of one of the many types of IAC failures.