You've just described something that actually is pure age discrimination: maintaining a company culture in which there is no room for people above a certain age, regardless of their skill, knowledge, personality and other qualifications.
Edit: Just to clarify: nobody "doesn't work well with everyone else" because of their age. That is a bogus argument, a clear sign of age discrimination.
What you can't have is the wrong reason for termination, which is why Google got in trouble. Using terms like “old guy” and “fuddy-duddy” implies that age is illegally shading your judgment, just like mentioning sex or religion or race would imply illegally shaded judgment.
(I'm not sure what to do with "doesn't fit in with the culture." On the one hand, I know what you mean. On the other, it seems like if you're really referring to corporate culture and not age, religion, national origin, etc., there should be something more specific you can say. Being vague and dropping a loaded word like "culture" sounds legally (even ethically) precarious. IANAL though.)
Manager tells employee to do something. Employee refuses. Usually this falls under "insubordination."
Manager tells employee to learn something new. Employee doesn't. This falls under "Employee is unable to perform duties assigned at an acceptable level."
Without talking about age, race, ethnicity, etc, this looks pretty cut and dry - person couldn't fulfill the duties they were hired to perform.
Of course anyone can sue for anything. But if you leave it as fact-based and about the work, not the person, it's pretty easy to avoid those issues.
[edited for typos]
Generally if someone doesn't fit with the culture you just fire them. Doesn't matter, old, young, black, gay, or muslim.
how do you handle firing someone that doesn't fit in with the company culture without them claiming age discrimination?
You don't "try to get them to quit" by making the workplace hostile. There is a great talk on this that one of Google's legal contractors gives which basically explains that if you don't think someone is a good fit, in Calfornia at least, you just fire them. It's common that firing someone is unpleasant, the mistake is "trying to make them uncomfortable so they just quit."
That last bit is where people make the big mistakes. It should never be the case where you (as a manager) are thinking "I just wish they would figure it out and leave."
Google screwed up here, and I don't believe for a second that the plaintiff would object if they admitted they did and apologized for it.
And if they have a sense that the PR is working against them on this, perhaps they will do exactly that.
I'm not saying the things that were said were right (they weren't) but how do you handle firing someone that doesn't fit in with the company culture without them claiming age discrimination?