I know exactly how you feel, and I have the exact solution for you.
Let me preface the next sentence by saying, this is nothing against you, because I've been there, I'm only trying to help you. With that said, here is how to get beyond it.
Simply put, it's an attitude problem.
To elaborate:
When you join a game, wait for your team to pick what they want to pick, then pick to the best of your knowledge what will help you win the game the most.
Step by step it will go something like this: (as an example)
In this last phase of picking it's important to not say the wrong things or to not demand anything of your teammates. Saying "Moira, can you please play mercy" is too demanding, and most of the time won't achieve anything. HOWEVER! Knowing your Moira mostly plays mercy, and suggesting to the team (politely) that your current team comp would benefit greatly from a mercy (even though every team comp would. LOL) may just get him to decide for himself that he wants to play mercy, which would probably be a huge buff to your team, and meanwhile no resentment or bad-blood was needed. On the other hand, they might not swap either, and you should be totally prepared and ok with that, DO NOT ask a 2nd time or say anything else here. Nothing at all.
After all this. It's just going to come down to you, not your teammates, YOU. Yes you might lose because you ran a dive comp all game with one of your tanks playing rein and refusing to swap. Or you had a DC or thrower(s), etc. But you can't win them all.