You don't seem to have trouble getting hard for your original gf and, I assume, for masturbation, but you do have trouble with your new gf.
I'm not a doctor or a therapist, but it does sound like you have guilt feelings when you are with gf#2. Believe me, every man has trouble performing with anxiety. If there is no physical reason for ed, then it has to be something mental or emotional.
And my colleagues here are right about cheating. Don't do it, if only for moral reasons. If you having regular sex with both gfs, it's possible you are going to be dealing with some big emotional issues soon. Whether you know it or not, you are playing with their feelings and that is a dangerous thing.