Thigh / hip pain getting worse each workout

If you are new to structured training it could be a multitude of things causing your issues. Yes it could be linked to every one of the items you listed. Indoor training is stressful on your body and will magnify bicycle fit issues. You could also have an imbalance caused from the surgery you mention. Your cleats should match your natural angle of your feet or it can put undo stress on your ankle, knee, and hip joints as you complete one pedal stroke. Your issue could be as simple as over stressing your hip muscles/joint and its causing inflammation if you are new to indoor training. I would be willing to bet this is the cause of your issue if you never have experience this issue riding outside.

I had a similar thing happen to me where i developed a sore heal on my left foot to the point i could not walk on it after 6 months of constant use of TR. A lot of ice and stretching routine solved the issue for me. It comes back once in a while to remind me to stretch more.

As PKwell suggests you may just need to stretch your hips out. I would start by cutting back on the intensity of the workouts for a few days if you can and really concentrate on stretching the muscles around your sore leg. Use Ice/anti-inflammatory medicine like Ibuprofen to cut the inflammation and i am willing to bet the pain will slowly go away. However it may return in the next training block as training ramps up again. If it continues i would start to look at getting a professional fit done.