The Second Amendment is remarkably short. As ratified by the States it reads:
A well regulated militia being necessary to the security of a free State, the right of the People to keep and bear arms shall not be infringed.
The Founders did NOT intend, as the narrative before and after the amendment was passed made clear, that the right to bear arms was predicated on their participation in a militia.
Repealing or altering the Second Amendment is possible and there is a process for it; the Constitution itself must be amended. It is not an easy procedure nor was it ever intended to be. A supermajority of both houses are required which would need to be followed by ratification by three quarters of the states within a given time frame.
That's very different than five unelected judges.