I'm sorry not to have written earlier.
That is more natural. Why? I think this is just one of those occasions when the answer is 'Because it is'.
Actually, most of us would probably say, "I'm sorry I didn't write earlier/sooner".
- For Teachers