OP, you sound lovely - really thoughtful.
I do have autism and I'm not easy to get to know, so I recognise a lot of what you describe.
To underline what others have already said: yes, some occupations and workplaces are known for being quite like that, and particularly the NHS. It's rubbish, and their behaviour was unacceptable.
Your broader question as to whether it could be something to do with you - it's very possibly not you, and just a run of bad luck.
In my own case: I know I am more relaxed and sociable when among people like me, doing something I see as meaningful or that I'm really into.
When I moved from one city to another, where there seemed to be fewer people like me, I felt indefinably as if I didn't fit in. For years I couldn't quite put my finger on it. I had also retrained, and moved into a field where people were very different, and my prior training seen as a sign that I wasn't really one of them.
Maybe in your case, the fact you've retrained (and perhaps seem to find it easy?) may be a bit threatening. Or maybe you're a few years older or younger than the others - that can make a big difference.
Some things I've done which have made a real difference: I remember details about people and ask them about themselves in ways that show I pay attention (I'm not great at this, but neither are the neurotypical, ha!)
I try to remember to be very grateful and positive when people are helpful, and to praise their strengths - particularly quieter people or people with hidden strengths. And I show my enthusiasm a lot (when I think it will help, and when it's authentic).
I found the school parent community tougher, but have found a place, partly by picking up on unspoken need for support, for example offering carpooling.
Shared interests and values also help a lot with breaking the ice.
I also decided to just not make any presumptions when I picked up on negative vibes (and there have been plenty!) People's lives are complicated and they have a lot going on.
It hasn't been easy and there are times still when I'm eaten with loneliness. But I've stopped worrying and am more accepting of who I am, and how others are, which has helped. And I've realised that we can change dynamics, to an extent, without having to change ourselves.
The old Dale Carnegie advice is timeless!