"It took two weeks."
間 indeed means a period of time. It's used a lot, and is a counter for periods of time. What's interesting is that it's used in this question, but then many questions in the time module omit 間 making it confusing for new learners of Japanese.
How long does it take? = どのぐらいかかりますか？
It takes two weeks = 二週間かかります
two years 二年間かかります
two days 二日間かかります
I try to figure out why 間 is used here. I think that it's depending on the context. Let's say your boss is asking you how many time a specific operation took and you answer " it's a 2 week flat rate to redo this again". So it's a "2 week time span" per action... It's hard to explain what I feel, any thought ?