Why did the image of Geronimo and the Native American community in general change so much in the period of the late 19th and early 20th centuries?
The image of Geronimo and the Native Americans in general changed because circumstances changed. As Native Americans became much less of a threat to white people, their image changed greatly.
Up through the 1870s, Native Americans constituted a serious danger to many white settlers. Their presence required the US to keep substantial military forces on the frontier to try to keep the Native Americans subdued and on their reservations. In this context, it is not surprising that American society would have an image of Native Americans as dangerous savages.
Later, though, all the Indians were safely on reservations and the "Wild West" was a thing of the past. This led to nostalgia on the part of Americans who felt they were losing an important part of their past. They came to see the Native Americans in a much more positive light. They saw them as part of the Wild West that was so much more exciting than contemporary life. This can be seen in the sorts of "Wild West" shows put on by Buffalo Bill.
Since the Native Americans were no longer a threat and since the Wild West way of life was disappearing, Native Americans came to have a much less fearsome image among many Americans.