I initially thought it was the neutral safety switch. But, it's located in the pan of the transmission and since it seems to be electrical, I dismissed that diagnosis. If you pull the cover off the shifter, inside you will see an inverted torque nut. Just below there is a plastic round disc. If you reach down the inverted nut, with your finger on the side closest to the engine, you will feel this disc. Pull the disc out towards the shifter, and you can switch gears...out of park. This will get you moving if stuck in a bad spot waiting the 20-30 minutes for it to reset. You can also wiggle the brake pedal and it might illuminate allowing you to start.
Now, there is a "stop, neutral switch" under your brake pedal. Replace this switch and your problems solved. It's about $20 and easy to do. I have had this thing at the dealer, another mechanic shop, and my dad has been a mechanic for 42 years. Nobody has figured this out. I have done this today and no problems yet. I will update in a few days.
2015 F350 Motorcraft part #SW7810
You can check if this is working right by starting the truck and pressing the brake pedal. You should hear the shift lock solenoid clicking as you press the pedal. If it doesn't click, wiggle the switch and wiring to see if it does. Believe it or not, this stupid little switch will lock you out of your truck. I have been dealing with this for 6 months. Please post your results!