It's tricky because none of these are really *wrong. They range from ✓good to ?questionable.

I would say the basic verbose form is take a long time. To my ear it only sounds good to omit a ... time when using a comparative or superlative form of long, or a negative. I don't think any other phrase behaves this way.

Absolute:
✓ It took a long time. (29.3 million Google hits)
? It took long. (3.5 million)

Negative:
✓ It did not take a long time. (1.5 million)
✓ It did not take long. (10.8 million)

Comparative:
✓ If X, it will take a longer time. (729,000)
✓ If X, it will take longer. (45.8 million)

(Note that less (short adjective) often sounds questionable; not as (short adjective) is better.)
? If Y, it will take a less long time. (0)
? If Y, it will take less long. (8,140)
✓ If Y, it will not take as long a time. (0, so maybe my judgment is wrong)
✓ If Y, it will not take as long. (1.1 million)