[statement] + 了 [subject] + 不 + [verb] + 了
了 at the end of a sentence says something is different now from how it was. It goes after a verb phrase, an adjective, or a number or time, and it is not a past tense.
我饿 on its own sounds unfinished. 我饿了 reports a change: I wasn't hungry, and now I am.
A past state with no change in it takes no 了.
不 + verb + 了 says something has stopped, or a plan has been dropped. 我不去 is a refusal; 我不去了 says you were going and now you aren't.
A change that didn't happen takes 没 and drops the 了.
With a length of time in front, the final 了 comes back: the not-doing has lasted that long and still holds.
太…了 also ends in 了, but it is a fixed frame meaning "too" or "so", not a change.