My question is simple. Which one sounds more natural to you?
1) I'm sorry, I haven't written to you for a while.
2) I'm sorry, I haven't been writing to you for a while.
I think 2 is better. Do you agree?
PS: To me the combination of "for a while" and "haven't written" sounds odd. "For a while" chimes with a lasting/repetitive action better. But "haven't written" is not a lasting/repetitive action. That is why I thought "haven't been writing " was better.