Hello, erectile dysfunction has two different reasons behind it - medical or psychological. If you are medically fit and has not medical illness then the most probably its psychological cause which can be treated easily with proper counseling, techniques and if required very less medication.
Next Steps
Consult a qualified psychiatrist /sexologist near you so that detail discussion and thorough evaluation is done and accordingly treatment can be suggested.
Health Tips
Don't worry this problem is easily treatable. All the best