I totally agree with what metropolis said. The only thing I would add is "Stop thinking you have to have sex anytime soon, you are only 16". Some people can handle it at that age, but you might be surprised to hear that most girls and guys can't emotionally. So give yourself a break, when you are really ready, things will happen.......And if for some extraordinary reason they don't, there are professionals who can and will, help you xxx
Believe me, you will be able to have sex soon and no, you won't become a lonely old man.
ED is an extremely common condition and affects men of all age groups, incl. teenagers. In your case, this may be a case of sexual performance anxiety: the testicle infection you mentioned seems to have disturbed you very much and made you worry about your sexual potency, which became a self fulfilling prophecy.
Anxiety is indeed a major cause of ED. When you get too anxious, the adrenaline in your system constricts peripheral circulation so that blood that can get to your vital organs (heart, lungs) more rapidly. The penis is not a vital organ. In fact, the last thing you need when you're facing danger or a stressful situation is an erection. Depression is also a major cause of ED.
You really shouldn't worry, though. ED is the PERMANENT inability to attain or maintain an erection, it is perfectly normal to fail every now and then. Moreover, ED is easily treatable.
I suggest you do some research on this subject. Talk to doctors, read books (I recommend the works of Tom F. Lue, a brilliant urologist), search the internet. The more you know about these problems, the less stressful they will be.
There are also simple ways to beat anxiety: a nap or a warm shower before sex can do wonders. Get some exercise, too.
If the situation persists, go see a urologist. It's no shame to seek professional help and even if this purely psychological, a urologist will be able to help you.