Tom is moving up the ranks, albeit slowly. 30 years later, he's apparently advanced from Lieutenant to Captain in the USN for the now-filming Top Gun sequel.
The plot has largely been a secret but indications are that the film is expected to be set nearly 30 years after the original -- though it appears Cruise's character has only reached the rank of Navy Captain despite serving as a Lieutenant in the first film. https://www.cnn.com/2018/05/31/politics/top-gun-air-force-navy-twitter/index.html