Hi,
First, good for you for your efforts to lose weight before surgery. Weight loss makes a big difference for some people and less for others.
Second, if land based weight bearing activity is too painful given your knee try whater based exercise of walking. Besides reducing load bearing, hydro-activities provide resistence in both directions of movement and increase energy expenditure, eg more kcal burned.
Good luck with the surgery.
Jim