Kia Troubleshooting Questions? Ask a Mechanic
You need a new stop lamp switch. It is located on the brake pedal mechanism.
Did you clear codes after replacing the switch?
You will need to have the codes cleared by your shop or if there is an autozone store in the area, they will do it for free. Then drive your vehicle, if the light comes back on, remove the large electrical connector from the abs module and check for the presence of brake fluid. The module is under the hood and has several brake lines connected to it.
The p0501 code can be caused by a faulty right front wheel speed sensor. The wire from this sensor goes from the wheel area up behind a plastic shield where it goes into a connector. Check behind that plastic shield for any chafing of the wires.