I'm sorry to hear about your situation and hope I can help.
My goal is to provide you with excellent service today.
While it is certainly unfair and wrong for you not to be promoted, it is, unfortunately, not illegal for you to be treated in an unfair manner by your employer. This would only be illegal if you were treated unfairly due to discrimination based on a protected characteristic, such as race, gender, national origin, ethnicity, or sex.
As your union said, if they can hire anyone from group two, they, unfortunately aren't obligated to take your comparative accomplishments and achievements into account over your fellow co-workers.
I realize that the above information is not what you wanted to hear, but I hope you appreciate an honest and direct answer. It would be unprofessional of me and unfair to you to provide you with anything less.
Please let me know if you have any follow up or clarifying questions.
Thanks and best of luck!