Hello and welcome to just answer. Yes this is most likely a failed brake pedal switch or a blown fuse. Check the stop lamp fuse first. If it is blown, then replace it. If not, then it is most likely the switch. Note: If the fuse is blown, you may have a short in your trailer wiring, so consider checking the wiring on the trailer before you blow another fuse.
I hope this information helps, and let me know if you need further assistance with this.