It would definitely take planning and an experienced operator to tag a 747 at 14,000 feet from the back.
Especially since the published ceiling for the Stinger is 9500 ft... The SA-7 is 2300 meters...
The other consideration I forgot to mention is that why would terrorists be there in the first place? It is the wrong place. The descriptions I've read of flight 800 state that it was unusually low. It had been prevented from a normal ascent due to an inbound flight. So normally, at that range out from the airport the aircraft would be even higher.
Now, putting yourself in the position of a terrorist... Why would you position yourself where aircraft would normally be even higher, just about guaranteed to be out of range? You don't plan for luck. Luck usually runs against you, and there are generally enough unknowns that in planning operations you control everything you possibly can. So terrorists would've stationed themselves closer in, where nominal aircraft ascent profiles would have had them in range.
As for where a heat seeker generally hits... What they "see" is a large blob of heat - the exhaust from the engines at a higher temp than the surrounding air.(*) As they close, the exhaust ducts and aXX-end of the engine resolve to even hotter than the air flow. So the heat seekers fly towards the exhaust plume, then correct into the back of the engine. Depending on the system they either contact detonate (dangerous to rely on, may not actually hit), or proximity detonate (extra hardware/software though), or simply detect the rapid rate of change of the target's relative position at closest point of approach, and detonate. That's one reason most SAMs carry fragmentation warheads - they only have to get close, then trash the aircraft's systems.
(*) Unless you're a newer Sidewinder like the AIM-9X. They are so-called "all aspect" missiles. The word is they can detect the temperature differential of the leading edge of a wing. At high speed air friction heats the leading edges... So they can be fired from the front aspect of the target.