Why was the F-117 retired so quickly?
Several reasons can be found for its early retirement:


the aircraft was instantly obsolete after one was shot down over Yugoslavia by a 30 year old SAM system
Maintenance was pretty expensive and difficult (and according to some involved large quantities of highly toxic chemicals that are still causing health problems for the people involved)
Few military reasons to keep it in the existing threat environment. An F/A-18 is cheaper to operate than an F-117 for bombing missions against insurgents and terrorists.
Politics. Retiring the F-117 could have been intended as a step towards asking for funding for more F-22s, claiming that the USAF was now without a tactical stealth aircraft for the ground attack mission (the F-22 at the time was envisioned as a multi role aircraft, having a secondary ground attack function like the F-15 and F-16).
The F-15 and F-16 have been kept in service through extensive replacement and upgrade programs for older models. There never was an upgraded F-117 proposed or built. The F/A-18 E/F are effectively a completely new aircraft and shouldn't be considered the same type as the older A/B.