Matthe3234, you do not have erectile dysfunction. You worry too much about sex -- and that's normal. All guys do, no matter what age they are. The more you worry about getting an erection, the less likely you are able to achieve one.
Start building your confidence by looking at all the positives in your life. For example, you are a very intelligent guy. That is obvious from the way you analyse yourself.
My sex education classes at school sucked really bad and I didn't learn anything so I'm unsure about a lot of things.
Most teachers know exactly what you're talking about and unfortunately, because of the restrictions imposed by the education system in most countries, that's the way it is. Search out some good sex education material for yourself: there is plenty available.
My best wishes.