I wouldn't think the government can tell a church who they must marry at all. Seems a clear breach of separation of church and state. If the state(s) can compel a church to go against it's theology then there is no separation any more.
There really is no question on that- the government cannot tell any church whom they must marry.
However, the government can tell business's that they cannot discriminate against people.
A church is not a business and doesn't follow the same rules.