I'm assuming it's a confidence issue but I don't know how to solve it.
Based on what you said, I would think you're right.
And one of the worst things about "performance anxiety" is that it tends to become a self-fulfilling prophecy.... because each failure you have makes it worse.
And the only way I know of to solve a confidence issue is to have more sex with the woman in question. I was a victim of a bad experience my "first time out". Too much to drink, but I'm not sure whether it was that or just beginner's fear.
I'll also warn you of something you may not know. Your penis is a "trust meter". If, for some reason, you don't like the woman or trust the woman to know you intimately and be bonded to you in this way, your penis is going to try to prevent the bonding for you.
It took me about 50 attempts before I was able to complete with my girl friend when I was 19. She was, fortunately, as inexperienced as I was so it didn't matter so much to her, we were just incredibly happy being together and trying it out.