See photo. I tested connections with an ohm meter. There are two grn/yellow wires. One is in the cable (three wires) connection to the charger. The 2nd I assume is a direct connection to the bike's chassis. (You said red; I said brown-ish)
On the bike side, the green/yellow will go to the bike frame as ground. The black is hot and the brown is the neutral for 120 VAC.
Both black and brown will be hot if 240 VAC is used. Frame will be neutral and ground for both sides of the 120 VAC when 240 VAC is used. Yeah, 240 VAC uses two 120 VAC lines, but opposite phase.
Neutral is grounded outside your home but ran as separate wires inside the home.
But all that doesn't really matter here.
What I would like to know is if your blue wire insulation also looks melted. It looks to me like a possible OBC problem of it drawing excusive current. Does the bike charge normally? Any strange smells or anything from the bottom of the bike while it was charging? You could have a bigger issue than just the connector.
-Don- Reno, NV