I don't think the OP's situation is quite as doom-and-gloom as suggested on the thread.
If your application is competitive for GS, then this can certainly work out. Given the lateness in the season, I agree that talking to the surgical PD at your current institution is Step 2. To be fair, talking to your own PD is step 1. You want to ask the Surgical PD if they will consider you for a categorical spot in this year's match. Your IM PD can share your ERAS app from last year, along with your USMLE transcript. You've been "interviewing" there since July. You might arrange to work with surgery for a few weeks between now and when rank lists are due, if you're lucky. There's no guarantee, but you really have nothing to lose. If your institution is part of a "network" with other hospitals that have training programs, then there's also a chance at those programs. Might as well ask.
The next question is whether you want your home program to consider you for a prelim GS spot. You'd want to talk to the surgical PD, get some sense of how successful they have been at getting people with prelim GS spots into categorical spots. But my overall sense is that if you're competitive enough for GS such that you would have matched had you applied fresh out of school, you'll probably get a spot -- hopefully a PGY-2, possibly matching again into a PGY-1 in next year's match. Your local surgical PD will be invaluable at looking at your app and being honest with you.
Assuming that doesn't work, then SOAP is the next step. Obviously you'll apply for any categorical spots that are open. The rest of your apps would be for surgical prelims (again, assuming your home surgical PD thinks this is a viable plan).
Major problems with all of this? If you haven't been honest with us and aren't really competitive for GS, or your performance in your IM residency is poor, you could get dead-ended -- drop your IM program, complete a surgery PGY-1 prelim, and then not get another spot. Now you'll find it much harder to continue -- IM programs may not be excited about offering you a PGY-2, and starting again as a PGY-1 in a new field seems really crazy (and would probably make you miserable). Plus you'll run into funding problems which shouldn't stop you from getting a spot, but may limit your choices further.
So, homework for next week:
1. Tell your IM PD. Don't let them find out about this via the grapevine.
2. Talk to your local surgery PD. Bring your ERAS app, evaluations. Have your IM PD speak to them first about your performance. Ask for very honest feedback about your chances in categorical surgery.
3. Complete as much surgical experience as you can between now and match. Make whatever swaps are necessary. Cancel vacation if necessary.
4. You seem certain that this is the right move for you. That said, try to make sure this is the right move for you. Switching to surgery, becoming disillusioned with it, and trying to switch back to IM would be a disaster.