I have pain in my both knees for year now always there, taking vitamin d helped briefly still having to take painkillers regularly what could it be?

Pain in knees. It appears that you have seen your doctor. A second opinion is a good option. You may wind up seeing a specialist. Peace and good health.