Either the brakelight switch is faulty and need replaced, or the rubber stopper that the brakelight switch plunger rests against when brake pedal is not engaged has dry rotted and fell out. The brake light switch is located on the brake pedal bracket at brake pedal. The rubber stopper is located just opposite the switch, in the brake pedal.
If rubber stopper is missing, you can insert a small bolt thru the opening where the rubber stopper used to be and secure it on the backside with a nut. If rubber stopper is in place, then switch is faulty and needs replaced.
Switch just screws into bracket: