Meeting Captain Star Trek: The Original Series - and Picard learned key lessons from Kirk's career mistakes after meeting the Starfleet icon.
Star Trek Generations was the historic meeting between the two greatest Captains of the Enterprise. Kirk was believed dead when he was lost in the space-ribbon called the Nexus in 2293; 78 years later, Picard's mission to stop a mad scientist named Dr. Tolian Soran (Malcolm McDowell) from destroying a star and killing billions led to him getting trapped in the Nexus as well - where Jean-Luc met Kirk, who believed he was also newly-arrived in the other-dimensional plane. They quickly agreed to team up and the two Captains returned to Veridian III in 2371 where they stopped Soran's scheme. Sadly, however, Kirk died from injuries sustained in their conflict. After burying Kirk, Picard returned to his Starfleet career - headlining three more U.S.S. Enterprise-E's Captain's chair in 2385. All told, Jean-Luc Picard was Captain of the Enterprise for 21 uninterrupted years.
When Kirk deferred to Picard as his peer in Star Trek Generations and humbly asked, "Who am I to argue with the Captain of the Enterprise?", Kirk asked if Jean-Luc was nearing retirement. When Picard answered, "I'm not planning on it," Kirk offered this crucial advice to his successor:
Well, let me tell you something. Don't! Don't let them promote you. Don't let them transfer you. Don't let them do *anything* that takes you off the bridge of that ship, because while you're there... you can make a difference.
Judging by Picard's career path after his chance encounter with Captain Kirk, Jean-Luc took his words to heart. Picard remained Captain of the Enterprise for another 14 years. After "making a difference" and saving the galaxy multiple times, Jean-Luc finally left Starfleet when he was 80 years old.
If Kirk could undo his past mistakes, he would undoubtedly have remained as Captain of the Enterprise for as long as possible. Kirk held the rank of iral for the first four Star Trek TOS movies, accepting a desk job that his two best friends, Star Trek IV: The Voyage Home, because it meant he could officially do the only job he wanted all along: "making a difference" by commanding his beloved starship.
Indeed, iral Kirk resorted to Machiavellian means to regain his command. In Star Trek: The Motion Picture, Kirk used his rank to take the Enterprise away from its rightful Captain, Star Trek II: The Wrath of Khan, Spock was Captain of the Enterprise and he graciously offered the big chair to Kirk, knowing Jim wanted it (and would have taken it anyway) when Khan (Ricardo Montalban) stole the Genesis Device. And, as Trekkers learned in Star Trek Generations, Kirk retired after Star Trek: The Motion Picture, only to turn his back on his peaceful, country life with his new love Antonia and return to Starfleet because he missed the action.
irably, Picard never displayed any inconsistency with his chosen career path; Jean-Luc was always solely dedicated to Enterprise.