What Judicial body? Every currently standing ruling regarding the merits of Trump's eligibility to be president under the 14th amendment have found that he is not eligible (although all are still in limbo pending the inevitable SCOTUS appeal). There is a colorable technical argument to be made that he is not excluded, but most of the legal community is not convinced by them.
The legal arguments about his eligibility to appear on the primary ballot are more nuanced, but seem kind of silly if he ultimately is inneligable to hold the office.
The states that have ruled that Trump can remain on the primary ballot all did so on some sort of procedural ground. Typically of the form "state law does not require a candidate to be elligable to hold office to appear on a primary ballot". In fairness to those states' lawmakers, what sort of braindead political party would try nominating someone who was inneligable to hold office?
It's going to get fucky, because no presidential candidate is actually on a citizen's ballot. We don't vote for the named candidate; we vote for a panel of unnamed electors pledged (but not obligated) to support the named candidate.
We need to be talking about "faithless electors" and the "National Popular Vote Interstate Compact", as the conditions are ripe for these to play a major role in the next election.
Whenever someone devises a system to be foolproof, someone goes out and finds a greater fool. The Republican party is nothing if not overflowing with greater fools