Ejaculation can be very mental and yes, that could be playing a part in this if you have anxiety that it might hurt. I would too and it can ruin the moment. However, more broadly, inability to ejaculate is part of erectile dysfunction. You need to discuss this with your doctor. https://www.merckmanuals.com/home/men-s-health-issues/sexual-dysfunction-in-men/inability-to-ejaculate The pain on the right side of your groin? This is at the time of ejaculation (or when it is supposed to happen) or more often?