Losing weight will definitely help you postpone knee replacements but unfortunately, it can't undo the damage that's already done.
I developed arthritis in both knees in my late 30s due to two decades of obesity. By the time I lost the weight when I was 46, my knees were pretty bad. But even though the arthritis was severe at that point, my knees were helped a lot by all the leg exercises, muscle strengthening, and elliptical that I did when I was losing the weight and maintaining. But once cartilage is gone, it's gone and no exercise or weight loss can bring it back. So my knees didn't get better but they sure as heck
felt better without an extra 122 pounds pressing down with every step!
What the weight loss did for me was to give me mobility for perhaps 8 - 10 more years. I had both knees replaced in 2008 (when I was 54) but it would have been sooner if I hadn't lost the weight. Honestly, I think I would have been in a scooter by that point if I was still obese.
Most importantly, losing the weight and becoming an everyday exerciser let me prepare for the surgery so to have the best possible outcome. I worked out for about two hours a day leading up to the surgery in order to strengthen the muscles that supported my knees as much as possible -- building an internal brace of muscle to take pressure off the joint. And it worked! I was able to walk a half mile the day after I got out of the hospital (10 days after surgery) and was driving by three weeks after the surgery. I never used a walker or cane once I was out of the hospital. Yay for strong muscles!
So yes, losing weight is tremendously beneficial to those of us with bad knees. It's not a cure but it will make everything you do, including surgery, so much easier.