Vit D3 deficiency doesn't cause erectile dysfunction. Common causes at your age are psychological and use of certain medications.
Medications like antacids, anti-hypertensive medicine , cholesterol medications etc.
Next Steps
Do not worry as this is not so common problem. If this is persisting then better consult a doctor.