The switch is adjustable. Adjust it!
Take a look at your rear brake pedal. There are two springs connected to it. The heavy spring is the one that pulls the pedal back to its home position. The light one leads into a little round housing - that's the rear brake switch. Note that this housing passes through a hex-shaped nut which is probably made of plastic. That's the adjustment nut.
Now, for a little bit of diagnosis. With the key on, pull on that little spring directly. Note that it's tied to a little plunger that comes out the bottom of the above-mentioned switch housing. If the brake lamp works when you pull on the spring and plunger directly, the switch simply needs to be adjusted (see below). If the brake lamp does not operate even when you can see that plunger pulling out of the housing, then either the switch is bad or it isn't plugged in - follow the wiring that comes out the top of the switch housing to the plug and make sure it's secure. Switch plugged in and the plunger pulls in and out and yet still no workie? replace the switch with a new one. They're cheap.
'Course, the other possibility is that the little spring is broken or missing. If you can see the little round housing with plastic nut and a wire coming out the top of it, and it's not connected in any way to the brake lever ... that's your problem, and take one guess how you need to fix it.
So ... if the switch is in place and working and the spring is where it should be, it needs to be adjusted. Turn the plastic nut NOT the switch housing itself. Turn it so that the switch housing moves further away from the spring (so that pulling on the spring pulls the plunger more / sooner). It's easy ... you'll figure it out.