Good morning, this is a common problem. First make sure the brake lights work when the brake pedal is depressed. If so then you will either need to repair the shifter assembly or replace it. Here is a link that shows step by step what to do to try and repair it:
If this answers your question then please press ACCEPT. If you need more help then let me know. Thanks.