I haven’t done it personally, but I’d recommend going ahead and contacting runDisney now. I believe it is a no refunds policy, but I’ve read where they’ve made exceptions for medical issues or emergencies on a case by case basis. I don’t think they’ll do a deferral, what I’ve seen people report before is that they offer a refund in Disney Gift Cards that can later be used to register for a different race or use at the parks or other eligible Disney expenses/purchases. I’d recommend sending a polite request explaining the situation and attaching either a copy of the surgical order or a letter from your doctor explaining that you will not be medically cleared in advance of the race.
Hopefully, this far in advance, runDisney support handles it quickly and satisfactorily through email. If they don’t respond within a week or so (or you get a refusal), I’d recommend calling and talking to somebody (and if necessary, their supervisor) to explain the situation and ask for the refund credit (or, if local, maybe try face to face with guest services? although I’m not 100% sure they could assist from a park, perhaps maybe WWoS staff could since runDisney is within that division?)
Good luck! That stinks that you won’t be able to race, but I hope you get a good and quick resolution!