Hello and welcome to JustAnswer!!
It sounds like you've got a locked up wireless control module (WCM). This is the module in the steering column that reads the transponder in the key to allow you to start the engine, and it also acts as the remote keyless entry receiver. When the WCM goes down the engine will start and die a few times and then lock the starter out, and you won't have any RKE functions.
This will probably reset. Open the fuse box under the hood and find the IOD fuse. This is in a white plastic holder that allows the fuse to be popped up but left in position for quick re-installation. Pull the fuse out for a few minutes, reinstall it and the truck should start. This will unlock the WCM almost every time. If it does unlock it this time, if the WCM isn't replaced you will probably end up having this happen more and more. It could end up leaving you stranded, so I would recommend having the module replaced.
The new module has to be programmed using the VIN number and a special code once it's installed, this "marries" it to the truck and allows you to start the engine. This programming requires a dealer scan tool. If you have someone with access to a dealer scan tool then it's something that you could do yourself.
The replacement module is actually pretty cheap. It runs just under $59, and it will be about an hour labor to replace and program it.