The correct answer is (D).
We use no article before “long time” because it is an uncountable noun. Uncountable nouns do not have a plural form and cannot be preceded by an article.
Here are some other examples of uncountable nouns:
- water
- air
- sand
- love
- happiness
We can use “a long time” to describe how long something lasted. For example, we might say “I waited in line for a long time” or “I studied for a long time.”
We can also use “a long time” to describe how long something took. For example, we might say “It took me a long time to finish the book” or “It took me a long time to learn how to drive.”