If the problem happens only with the fob its a keyless problem. Probably loose connections as stated before.
If it happens with the key and fob its a truck problem. If the vehicle has a physical key that makes the keyless an add on accessory.
GM examples
shifter and or cable
Neutral switch
Allison examples
shifter and or cable.
Lets say your shift cable is worn out/stretched. It might go into park but not enough for the switch to register. Going from park to drive hundreds of times a day causes this. Now you have a no start in park problem with fob and key. Mechanic figures it out, replaces cable, but doesn't fully adjust the cable. He adjusted it enough to start in park. Maybe it could have used a few more turns to get a few more hundred shifts. A year later, boom same problem.
As far as letting it sit for 15 minutes and everything is fine, I would have to see the truck. Going off your complaint Im thinking, depending on a gm or allison, probably a cable. Im thinking during the 15 minutes you're messing with the shifter and just wiggled it enough to get park to register. Being a driver you're more likely to notice the time and not think about the moving components.
Any time a vehicle with an automatic transmission doesn't start in park try it in neutral. Especially vehicles that are slammed into park hundreds of times a day.
If I get a no start in park with key and fob write up, I replace the shifter, cable and if its a gm, the neutral switch. If 1 went bad how long for the others? I don't know, so I replace them together. I dont get a bonus for bringing the company under budget.