Not an analogy - close though. The relationship between the two sets don't match.
Army is to General as Navy is to Admiral (top rank of the the service) would be one way to make it correct.
Anyway, the analogy here is the most well-known characters that have been played by the same actor. Ian McKellen's best known roles are Gandalf and Magneto, and Harrison Ford's best known roles are Han Solo and Indiana Jones. Hope that clears things up.