Even if Trump loses the primary then how does he demonstrate the damage is due to Cruz being on the ballot as opposed to Kasich, Bush, Carson, or Rubio?
If the number of votes obtained by the alleged ineligible candidate(s) is big enough to affect the outcome of the contest, the court has to make a finding as to eligibility. If the outcome could be affected (look at the margins of victory) and the alleged ineligible candidate is found ineligible, the remedy is an election do-over (unless the ballot only had two candidates to begin with, or third and lower candidates can't win even if given all the votes of the ineligible candidate, then the 2nd place finisher wins)
If the alleged ineligible candidate gets 100 votes out of 100,000; and there is no 100 vote (close) margin between any two players, the court can dodge the issue because the outcome is unchanged no matter where those 100 votes are hypothetically placed.
But if the alleged ineligible candidate gets enough votes to affect the delegate allocation or other outcome, the only way to figure out how the voters will choose is to give them another election, with the ineligible candidate(s) off the ballot.