IMO, I would have passed on the knee surgery, and just lighten up the load/pace or whatever on the knees.. Example, a couple decades ago, I could run long distances.. I was runnning about 5 times a week. After a couple years of that, and getting some knee pain, the docs told me my cartlidge was SHOT, and that I needed surgery. Also, I had the option to stop running. I choose to stop running..End result, my knees are still there, no surgery. No I can't run those long distances, but I can still run, and now riding the bicycle.
Since you have already had the surgery, I will stick with a workout/weight training program that targets losing weight. and go from there..
Once again, surgery should be the last, last, and really last resort..
Luck to you...