Yes that is a real bugger. I have a 2011 chevy dmax. Problem free first 25k then to the shop three times in three weeks for DEF issues. It appears to be fixed now. I have driven a couple thousand miles sense last problem. I have had two issues in the past while on long trips over 5k a piece. Each time I will have to say the two dealers I went to took care of me right away. One was a shorted tranny wire that took about 4 hours to fix. The other was a air filter sensor. I was under full warranty at the time and the dealers were very helpful.
I think I would go after the dealer checks it out again. That's why you buy your truck with a warranty. Plus a check engine light for a loose wire doesn't sound to serious. I would check for the code on your receipt and google it. JMHO