The problem is most probably the switch located just above the brake peddal. Try pulling the break peddal up.If the lights turn off the switch just needs to be adjusted.
You need to adjust your brake light switch. It should be located on the brake pedal. Unplug the switch and loosen the nuts to adjust the button closer to the brake pedal.