This idea that, “if God was good, He wouldn’t be sending people to hell," is taken on straightforwardly by Paul in Romans chapter three.
“He’s the judge”, Paul says.
“What’dya expect?"
"He does what judges do, He judges."
Romans 3.5b
…what shall we say? That God is unrighteous to inflict wrath on us?
Romans 3.6
By no means! For then how could God judge the world?
Romans 3.19
so that… the whole world may be held accountable to God.