Do you have a physical or medical condition that’s limiting your ability to exercise? And you keep bringing up the treadmill…again…why don’t you use other equipments? Elliptical is much better for your knees/hips. Stairmaster is just climbing up stairs. Cycling is also an option. There there are exercises without any equipment…using your body weight.
And if you don’t already have a medical/physical condition, then get clearance from your doctor before exercising. The pain you’re describing is not normal.