Most likely the connections for the grounding nuts were not clean or there wasn't a tight connection providing a good ground. Double check the ring connection of the 14GA black wire, connected to the solenoid and the bottom side of the motor are clean and tight fitting, to provide a good ground. If the 2GA ground cable and the 14GA ground wire connections are not clean and tight to the motor and battery, the amperage traveling through the ground cable and 14GA wire will take the path of less resistance and would be why the 14GA wire was the wire to carry the higher amperage and not the heavier 2GA cable causing the 14GA wire to be overloaded and the insulation to melt.