Hi, welcome to Just Answer.
Rip
Thanks, sounds like you have a faulty Brake Switch, which is mounted above the brake pedal. If you have access to a voltmeter, I can help you further test it. Also, on these trucks be sure to check your 3rd lamp brake bulb, it may be out and often on these the top lamp works but the two lower will not due to a failed Turn Signal Switch on the steering column. If all (3) brake lamps aren't operational it will be a bad Brake Switch or the power supply to the switch.
Lead Technician
A.S.E Certified Master Technician, AC Delco service training, Ca State Smog License, L1 level