irleerah
As iconic as Peter Parker is, if he has to die then I think it's really good for someone who's not white to take his place. And I don't personally feel they killed Peter off "just for diversity" they gave him a really good death; like honourable and it was done well, it wasn't just some thoughtless kill. Plus Miles isn't just good for diversity he's a good step for an actual modern superhero. I'd also say in those first few issues he's been pretty relatable.
What you feel isn't important. The writer said that that's exactly what he did. He wanted a non-white Spiderman, so he killed the white one he already had to make room. It's something he's wanted for a while now, since before Ultimatum, and he finally got the green light for it, even though the story was obviously leading towards Peter joining the Ultimates.