Ultron believes that humans are the problem, and thus they cannot be a part of the solution. He says:
I know you're good people. I know you mean well. But you just didn't think it through. There is only one path to peace... your extinction.
According to Marvel.com:
Ultron decides that the best way to save the Earth is to destroy all the people on it to make way for a new race of highly intelligent robotic lifeforms.
and
When Ultron wakes up, though, he finds his creators lacking. He instantly makes moves to wipe the Avengers—and most of humanity—off the map, to evolve life on the planet to the next step.
According to at least one Fandom page, his goal is to achieve technological singularity.