What if for some reason such as McNamara leaves his post earlier or some sanity prevails and everyone realize the F-111 isn't a fighter thus the entire project is canned?
I think it's important to nail down exacting what's being asked here. As there's really two very, very different PoDs that this can cover: One is where the TFX tender is never made -- such as by Nixon winning in 1960 and butterflying McNamara becoming SecDef -- and the other is one where the TFX program is initiated and then, for whatever reason, cancelled. I'm assuming you meant the latter, where McNamara has a meeting with Truck-kun and gets isekaied to a place where he can build Orions bound for Mars while we're stuck in the inferior timeline for it. And that the isekaiing happens fairly early in TFX's lifecycle.
What are the options if this happens?
The USAF's strike requirements are what they are and there are a variety of other options to pursue to fill it. All of the other TFX competitors -- entries from Boeing, Lockheed, McConnell, NAA, and Republic were all on offer -- could be made to work, though the Boeing 818 had been the USAF's preferred option before the creation of the TFX program to fill the role and would be the most likely successor after TFX's demise.
There's also
another twin-engined, two-seat high-speed, low-altitude penetrator currently in active development at the time of TFX's cancellation. One that makes fans of aviation history swoon, which always hangs out in the back of discussions of alternative F-111s, never really making its presence felt but always there nonetheless. Love or hate the TSR.2, it's
an option, even if the politics of getting it adopted are head-spinning and it doesn't come close to meeting the payload requirements of the TFX RFP.
What would be the consequences?
The major consequences are that the USN gets to have an entirely allohistorical development program for its fleet defense interceptor. As
@BlueTrousers says, this does not mean Grumman goes straight to the F-14 the better part of a decade ahead of time, but it also doesn't mean you won't get an F13F that is roughly what we'd call Tomcat-shaped, either. (Which is what we want, so that we can get the F-14 as the F14F, as God intended.) Though what, exactly, happens with the Navy's fleet defender program is also subject to the author's creative whims, as it can go everywhere from trying to get the F-14 and Typhon'ing itself to just building a Missileer that's a bit less of a death trap.
This ultimately depends upon butterflies, but there's no reason they wouldn't buy the *F-111 that's produced for the USAF, which would almost certainly be the Boeing 818. However, that's...not precisely boring, but there are other, spicier options if you want to invoke butterflies. As the RAAF considered both TSR.2 and the A3J Vigilante, with Australia's requirements playing a minor role in the former's agonizing design process. I've always had warm fuzzies for the Aussies somehow buying the Vigilante and then keeping it flying as long as they did the F-111, just because Vigilantes are awesome. (Are A-5s as cool as F-111s? A question for the ages.)