Ted Cruz lost for the same reason Bernie lost (or will lose, if you want to be technical). He was too far on the spectrum for the typical voter. Republican voters generally like to vote for moderate-right candidates (McCain, Romney, etc). Cruz was far right. That means, like Bernie, he’ll have a strong but small following of loud, passionate true believers and then lose.
Donald Trump is now the Republican nominee. Unless she gets arrested (unlikely), the general election will be Lizard Queen vs. the Authoritarian Nationalist.