If it were just one person at the front door, ya, you could not do it, if it is a gang, banging “threatening to enter”, just blow their F’ing heads off and let someone prosecute you for defending your life against thug action... but don’t open the door, blow a hole through the door, your stopping their entry... that’s how I would defend it.
Likely not successfully.
Generally speaking, (laws vary), on private property, citizens have fewer rights, but they still must exhibit violent intent before you can use lethal force.
They must enter the residence without permission, ideally breaking a lock, door or window, or employ a deadly weapon against the residence from outside. Either establishes intent and fear for life.
A group that agrees to, travels to, and trespasses upon private residential property establishes a conspiracy and each is responsible for the criminal acts of the other. This does not apply to public property.
Persons acting peaceably outside, and not attempting to enter a private residence are trespassing and can be arrested and prosecuted for that, but must put the resident in fear of his life to be legally shot.