Have you tried the other key fob? I see you've tried a new battery in the fob, would have been my first suggestion. But if you've already done that i'd like to know how the other fob behaves. If the other one works normally (which is likely) then you probably just need to replace the fob. They do "wear out" over time, especially if you keep them in your pocket regularly. The added moisture/humidity/dirt/sand/etc from being in the pocket can wear them out as well.
You can try taking it apart, and remove the circuit board from the fob (basically just a step further than just replacing the battery). Use a tooth brush and dip it in some rubbing alcohol and gently scrub/brush off both sides of the board. Use enough pressure to actually scrub it, but not to excess where it would damage it. This will usually do a pretty good job to clean off any corrosion that may be present from moisture (if you live in a humid region (southern USA) or sweat/moisture from being in your pockets. Let it dry for a few minutes (alcohol dries pretty quickly) and put it back together. Sometimes this can help to revive a failing key fob, sometimes not.
On the other side, if the other fob doesn't work either then it may be a failing RF receiver in the truck itself. The receiver for the factory system is located behind the plastic cover in the rear corner of the truck on the passenger side, next to the back seat. Failure of the receiver is uncommon, typically it's a fob because they are exposed to a lot more use/abuse than the receiver is.
Give the fob cleaning a try and try your other one if you still have it, and let me know what happens. I'd be happy to help try to proceed to further diagnosis to condemn the module itself if necessary (depending on your mechanical/electrical aptitude) but if i were a betting man i would suspect a fob.