The difference is in tense. "I haven't taught English in years" is present perfect tense while "I haven't been teaching English FOR years" is present perfect continuous tense.
When it comes to present perfect continuous it is used to describe an event that started in the past but continues up until now: "I have been teaching English for years." There are other uses but it is important to note that both simple and continuous are always used to describe an event in the RECENT past that IMPACTS the present in one way or the other. For example "I have lost my wallet" happened recently and is still important this very moment because I'm out of money/credit cards.
Going back to your sentences, the only difference between them is emphasis on time or action/event. Both sentences basically mean the same though most people would use the first one. The present perfect continuous sentence would be used to emphasize the duration (the YEARS).