The first example, with its trailing "as," requires a comparison. It took John twice as much time as Jim to get home (twice as much time as the time it took Jim).
Without the stated, included comparision, it is simply implied from context. Twice as much time [today as it did yesterday] / [as it took Jim] / [in a car today than it did on his bike last week] to get home.
If the comparision is in the sentence, you need that "as"; if it is implied from context, you do not need the "as."
Student or Learner