I would be tempted not to tell them until it is closer to the time and your job is secure (but I wouldn't tell them that Id scheduled the surgery ages ago, but rather make it like it is unavoidable now).
I would worry that telling them early on, they would figure itd be best to find someone else who can stay permanently. I don't know though.
Id been in a similar situation to you, choosing between a job or surgery. Im having my final stage of phallo surgery on Tuesday. But up until 5 days ago, I didn't have a date (but had been fighting to get one for 6months!) Ive not been earning any money this whole time since I had been lead to believe my op would've been done by now. I potentially have my dream job starting in March, so was worried I wouldn't heal from such a big surgery in time. Im going to try to go for it anyway

I hope it all works out for you.
I would say that 2weeks you would be ok to go back, hopefully. But depends on how physical your job is, since you say it is quite physical.
But anyway, good luck with your surgery, your healing AND your job!