Leg extensions, seated/lying leg curls, leg press, hack squat, leg press calf extensions, hip adductor/abductor machine, hip thrust machine if your gym has it, etc. Knee pain is hard to combat entirely because you are inherently going to be placing some strain on the knee. Just start with lighter loads and progress slowly in weight to avoid too much wear.