I had this problem shortly after I got mine home. The system would work to turn off the lights, and then come back on again in a half an hour or so. The alarm they installed tapped the wrong wire for the power. Also, if you turn the engine off then turn the lights off and on, it will not work.
Have you added any electrics lately? Remote starter, security, etc.
For me, I start the truck, put the headlights on, then turn it off the engine, exit the vehicle lock it (once or twice) and lights should go off.
If it doesn't work I think taking it in to dealership is the only solution. (if still under warranty no problems.)
Bill