Yes, it was appropriate for Jimmy Kimmel to impersonate Ryan Lochte at the VMAs. Jimmy Kimmel is a comedian, and the VMAs are known for having jokes that poke fun at celebrities, so an impersonation of Lochte fit in perfectly. The jokes at the VMAs are usually topical, too, so the Lochte impersonation worked well considering the timing.
Anyone with notoriety recognizes that there is a possibility of being impersonated. It is somewhat expected. Ryan Lochte, like any other well-known athlete or celebrity, is not immune from public scrutiny. It becomes inappropriate when it involves harassment, stalking, or slander. Absent of those things, it is certainly not inappropriate.
While impersonation geberally is a crime, Jimmy Kimmel impersonating Ryan Lochte at the VMAs should probably not be considered as such. It was afterall a show, and probably done as a joke for entertainment. The ethical aspect should be up to the impersonator to decide whether it was appropriate or not.
Jimmy Fallons's brand of comedy doesn't usually including bashing celebrities. Not saying that someone who usually does that type of comedy would have been funnier. Jimmy has changed the face of late night television by being nicer and happier when it comes to his comedy. His impersonations usually have at least a little love behind them. If their intention was to make us laugh at Ryan's mistakes, then Fallon was a poor choice. Although the actual poor choice was to call out Lochte in the first place. Nothing about that moment fit with the theme of the night.