Cruz
could be the plaintiff, in certain instances (any instance in which the case involved the declaratory judgment Trump mentioned). If, hypothetically, some county registrar in New Hampshire publicly stated that he did not think Cruz was eligible, and would not count Cruz votes, then (again, hypothetically) Cruz could bring an action seeking a declaratory judgment that he is eligible (and a writ of mandamus ordering the registrar to count his votes).
Trump's legal analysis is (as expected) complete horsecr*p, but he's right that (in certain limited instances, which do not currently exist) Cruz could, theoretically, bring his own action to determine eligibility.