Could the Church ever change its position and allow homosexuals to marry?

The Church cannot change its teaching on marriage, which is grounded in natural law. Under natural law a man can marry only whom he was designed to marry: a woman. He cannot validly marry another man any more than he could an animal or a plant. Any attempted marriage between a man and another man would be invalid by definition. It might be recognized by the state as a legitimate marriage, but it would not be so before God.