You are wasting your time doing anything other than going to the dealer and having them do a scan tool. Not a standard scan tool, has to be GMC. I have, on multiple occasions, gotten them to come read codes without dropping it off. Say you are in a hurry and the code comes and goes and you want to get a reading while the code is present and you are worried since it disappears sometimes. That will get you some ideas.
For me, the things on this complete POS truck that have caused that light in two years of ownership: every time it left my family and I stranded on the road from randomly dying with unknown still cause (super common on these), Cam phaser, cam sensor, oil pump, electronic shock failure, rear airbag failure, bad battery, failed alternator, oh, and what's that last thing...oh, a spun cam bearing requiring a NEW BLOCK! I will, never, ever, ever, buy a chevy or GMC product again.