The F-14 was not phased out of the US inventory until 2006. However, the sanctions that affected Iran were put in place almost immediately after the revolution that toppled the Shah. In the 27 years in between, the F-14 underwent two major upgrades (B and D variants) and served as the air defense backbone of the US Navy. It was not retired until airframe life and capability limitations resulted in it being superseded by the F/A-18E/F Super Hornet.
This is encroaching on the 20-year rule, but even during the Iran-Iraq War, Iran's ability to keep the F-14 flying in combat readiness was debatable. It's known that Iran scavenged some of its planes to keep others flying, and it has almost certainly reverse-engineered some parts to manufacture locally. Whether it can make effective use of the Phoenix missiles Iran purchased with the F-14 is unknown, but by now, they're long past their shelf life. At this point, as an early fourth-generation fighter, the Tomcat would be showing its age. They first flew more than 40 years ago, and have been supplanted by 4.5-generation and fifth-generation fighters.
Sources:
Cannibalization estimates vary from source to source: