From 2C:3-4:
"The use of deadly force is not justifiable under this section unless the actor reasonably believes that such force is necessary to protect himself against death or serious bodily harm"
"The actor is not obliged to retreat from his dwelling, unless he was the initial aggressor"
"the use of force or deadly force upon or toward an intruder who is unlawfully in a dwelling is justifiable when the actor reasonably believes that the force is immediately necessary for the purpose of protecting himself or other persons in the dwelling against the use of unlawful force by the intruder on the present occasion"
"A reasonable belief exists when the actor, to protect himself or a third person, was in his own dwelling at the time of the offense or was privileged to be thereon and the encounter between the actor and intruder was sudden and unexpected, compelling the actor to act instantly and The actor reasonably believed that the intruder would inflict personal injury upon the actor or others in the dwelling; or the actor demanded that the intruder disarm, surrender or withdraw, and the intruder refused to do so"
"An actor employing protective force may estimate the necessity of using force when the force is used, without retreating, surrendering possession, withdrawing or doing any other act which he has no legal duty to do or abstaining from any lawful action"
Those are excerpts. There's more to it, but it clearly demonstrates there is no legal requirement to retreat when inside your own home. Outside the home is a different story.
But - unlike other states with actual "Castle Doctrine" laws, NJ's laws on the use of self-defense, as outlined above, are an affirmative defense to crimes of assault, aggravated assault, assault with a deadly weapon, manslaughter, etc. Meaning - if someone breaks into your house and threatens you (or even if you just FEEL threatened), and you respond with force, up to and including deadly force, it's still possible that you can be charged with one or more crimes - then it's on you to prove that your illegal actions were justified under 2C:3-4.