I think you need to educate yourself a bit here. Japan's surrender was inevitable, largely due to Russia pressing them. The war was ending whether those bombs dropped or not.
Dead is dead.
You are correct in the sense that Japan was going to surrender at some point, whether that was due to conventional bombings, starvation from naval blockades or an actual invasion by the USA, there's no scenario where they don't sign an unconditional surrender.
Most of those scenarios would have killed more people than the two nuclear weapons being dropped.