Troubleshooting something like this over the Internet would likely be as conclusive as determining a home pregnancy test result by taste in a dark room, but there are a few symptoms in your post that might shed some light on possible causes.
The shift lever isn't a mechanical linkage like the old days. It's a switch that sends a signal (depending on position) to the HUD and Transmission Control Module. If the proper shift lever position signal isn't received by the Run/Crank Relay Control circuit, the car won't start.
Since you noticed the headlamps were acting kind of flaky during daytime operation, it could be related. Anytime the car starts acting bi-polar, the battery and it's connections are always a good first thing to check. Nominal voltage (as read on the Instrument Panel Cluster) doesn't mean a battery is necessarily good, but a low reading spells trouble. Of course, that would probably generate a message too. . .
But it's worth checking out because the battery voltage is fed to the shift lever and transmission shift lock circuit via Fuse 19 (10 amp) in the Body Control Module under the passenger side toeboard. (The owner's manual says it's BCM fuse 10, but the repair manual sticks with fuse 19.)
If the battery checks out, the power distribution network is working, and the shift lever is good, the Transmission Control Module might be suspect. The only way to know for sure is to have the car connected to a Tech 2 and receive a full diagnostic, which of course, means a tow to a dealer if you can't get it started.
I wish I could tell you more, and hope you get this resolved as quickly (and cheaply!) as possible. Please write back and let us know what ultimately fixes this.