Brake light is powered from battery too. Power comes from one or both of brake light switches on handle bars. Its unlikely both are bad or have an issue but possible. Get a multimeter and probe the brake light socket for voltage. Work your way back towards the battery from there. Its unlikely a ground issue since the tail light is working and shares the same ground. Also, there are (bullet) connections in the wiring from tail light assembly to wiring harness. Those are under the fuel tank above rear fender. Three wires, ground, tail light and brake light. Could be bad connection there. (edited)