Why does Holden say that he misses people at the end?
At the end of the story, Holden has undergone psychoanalysis. He tells us in Chapter 26, that his:
"Psychoanalyst guy they have here, keeps asking me if I'm going to apply myself when I go back to school next September." (Salinger)
Holden's admission of missing people is a sign that he is getting better. He has been in a mental institution and now, he is anticipating the future, the next school he will attend, how he will do once he gets there.
And, now that he has undergone treatment for his depression and can reflect with accuracy on his experience at Pencey Prep, he realizes that he actually liked Stradlater and Ackley.
There are a couple of different reasons and interpretations for this admission.
First of all, Holden may have matured a bit during his entire escapade. He may be realizing that he's not entirely ready to grow up and move on yet, and wants to go back to the comfort of his childhood, even if it was full of people he didn't like. He may also be realizing how judgmental he was being, and is now actually admitting that he did like and care about these people.
The other simple reason may be that Holden doesn't quite understand how and why everything happened to him, and the only feeling he can identify is the feeling of missing--people, his childhood, Allie, school, etc.