There is a sensor that the brake pedal hits when not in use. When you push in the pedal the button on the sensor is released and the lights turn on. The sensor is jammed way up in the dash above the steering column. I have best luck accessing it from the key side of the column. Hopefully this is what you are asking about. The replacement part is less than $10 if that is the issue. I have replaced mine as well but am not having problems with the brake lights staying on. My brake doesn't return all the way when I take my foot off the brake. I have had to just the 7 twice in the last week because I didn't check to ensure the lights turned off.
This is what I replaced mine with.
2013 JK Sport (see info on left)
FOR SALE: ($3,500) 1983 CJ7, 258-I6, 32/36 Weber Carb, 32x11.5x15 tires, SOA
Utah Jeep Crew #178