That solenoid has gone bad for people in this forum over the years and it sounds like your’s may have also. One other thing to check is the 50 amp circuit breaker in your house battery box. It has a red or yellow flag that should not be showing. It has a button that deploys the flag and breaks the circuit. If the flag is visible, yo7 just push it back in. From your description I do not think that is your problem, but it is worthwhile to check.
As far as your batteries are concerned, if they still have full electrolyte, they probably will be fine after they are recharged. They are built to be discharged.
One other thought, that switch needs power and there may not be enough power in the batteries to switch it on, if you left the switch off while plugged into shore power, it was not recharging your batteries. If they ran down during that time, it may be that when you unplugged and tried to switch to 12v power, there was not enough voltage in the battery to operate the switch. I would try recharging the house batteries with an external charger and see if that solves the problem.