Brake light switch: The brake light switch is a small switch that is located on the brake pedal. When you press the brake pedal, the switch sends a signal to the brake lights to turn on. If the brake light switch is faulty, it can cause the brake lights to stay on even when the brake pedal is not being pressed.
Brake light bulb: If the brake light bulb is burned out, it can cause the brake light to stay on. Check the brake light bulb to make sure that it is not burned out.
Wiring: The wiring that connects the brake light switch to the brake lights can also be faulty. If the wiring is faulty, it can cause the brake lights to stay on even when the brake pedal is not being pressed.
If you are not comfortable checking these things yourself, you can take your Nissan Frontier to a qualified mechanic to have them diagnosed and repaired.