The Second Amendment:
So there are 2 distinct groups called out here (the comma matters):
A well regulated militia being necessary to the security of a free state,
the right of the people to keep and bear arms
The training laws/rules in question have nothing to do with group 1, they are all about group 2 as they pertain to what requirements "the people" have to adhere to in order to bear arms. This has nothing to do with militias.
Then the final clause comes in: "shall not be infringed". For our purposes in discussing the NJ CWP requirements:
"the right of the people to keep and bear Arms, shall not be infringed" is all that matters.