I think you ruined it, but if it works don't sweat it. Just get a multimeter (an analog one works best for something like this) and touch the leads to it in resistance mode. If the needle jumps and starts to go back slowly, it's fine. (That is, if it's actually a capacitor)
Looks like you just melted the plastic casing. As long as you don't see any exposed parts underneath the burnt plastic, I would say it's fine. What is it anyways? Looks kind of like a relay switch.
More importantly, where is it? Take a picture of the whole NES board and point it out. The someone who can recognize it in real life can tell you what it is and how to test it, or if you destroyed it by melting it.