He did - he took a stand on the only part of the question that would be affected by him being elected president.
The media is focusing on whether the candidates would attend a homosexual "wedding" because if they say they will, it allows the media to portray them as hypocrites for opposing same-sex marriages in general; or if they say they won't, it allows the media to portray them as being heartless ideologues who care less about their friends and family than they do about their "extremist" political or religious policies.
Cruz is focusing on the issue truly at stake in regard to this question: who gets to decide what constitutes a legal marriage? Is it the states, as has been the case in this country since its founding? Or do unelected federal judges have the right to ignore the Constitution and overthrow the decisions made by the states and the people?
Cruz is the adult in a room full of children. He keeps hitting on these issues using this approach and he’s going to win.