This is one of the things that no one can really explain to me. Two non-Catholics get married and their marriage is valid. A Catholic gets married outside the church and it’s invalid. How does this make sense. And yes it does apply to my situation.
Here is the reason why:
What “makes” a marriage happen is the exchange of consent between the two parties.
In the case of Catholics, that exchange of consent must be witnessed by the Church (usually that means a priest or deacon, but can be a layperson is certain circumstances).
This is important: it is a matter of the Church’s discipline (ie laws) that the consent must be witnessed by the Church—it’s not a matter of Divine Law. That is a human law and it can be changed. Indeed, the law is relatively new (only a few centuries

) It can also change by circumstances. If there are only 2 Catholics living in a very remote place, they can actually marry each other in the presence of witnesses alone (who should be, but are not required to be Catholic).
The point is that the exchange of consent must happen, while doing so in the presence of the Church’s minister is something that should happen, but if that’s not possible, the marriage is still valid and sacramental.
In the case of Protestants, it’s usually not possible (or practical) to have a minister of the Church witness their consent. Yes, they might have access to a Protestant minister, but in the end, he is no different than any other layperson. So, to put that into other words, 2 Protestants exchanging consent in front of a Protestant minister is really no different than exchanging consent in front of a Justice of the Peace–since neither is ordained, and neither is a minister of the Church (note the capital C there).
If two Catholics attempt marriage without a minister of the Church (assuming that’s possible), then those Catholics are, by their actions and by their own choice, rejecting the assistance of the Church in their lives.
That’s a long way of explaining why 2 Catholics who marry in front of a Justice of the Peace. are not validly married, while 2 Protestants who marry in front of a JP are validly married.
With regard to the Orthodox, because they are true Churches, the Catholic Church recognizes their canon laws as binding on them. Their laws require that a priest must perform (not witness, but perform) the marriage; therefore if they aren’t married according to their own laws, neither the Catholic nor the respective Orthodox Church considers such as a valid marriage.