I had the same thing happen on an 1999 Dodge 2500 and it was the rear speed sensor located on top of the back rearend got from dealer for about $35.
Connection failure.
Yes . Over time brake fluid can leak out and cause a failure.
fuse, bulbs
Contaminated brake fluid.Rusted, rotted brake lines.
brake light switch would be most common cause
Faulty vehicle speed sensor.
The most common cause is failure of the Master Cylinder. Leaking wheel cylinders & calibers is another cause. Of course worn brake pads or shoes can cause defective brakes. Lastly would be a broken brake line hose.
BAD BRAKE LIGHT SWITCH AT TOP OF BRAKE PEDAL
The BOO (Brake On/Off) Switch may need to be replaced. If it is bad, it would cause the brake lights to NOT illuminate when the brake pedal is applied.
Possible ground issue at the taillights.
Blown fuse or defective brake light switch.
It could be the brake failure sensor in this year there is a wire that shorts out. All you have to do is find you brake light wire going in and the wire coming out of this sensor. Splice only those two wires and connnect and tape them off. Your lights should all work now.