If you didn't wipe out the solenoid, simply reverse the "S" and "I" wires at the front of the solenoid, It should run fine then...If the contacts didn't get welded..
To test , use a test lamp or meter, on one wire either one, and turn the switch on..If it lights the lamp or reads 12 volts, that goes to the "I" terminal..
Then test the other, The lamp or meter should only indicate in the "Start position" on the key switch and decline when released to the run position...If it does, that wire goes to the "S" terminal.
That should straighten it out.
BTW, that solenoid on EBAY can be had at auto zombie for about $7 bucks..what a rip off..