"How long does it take to get pregnant?", translated into Chinese, would be "怀孕需要多久?" , which literally means "To get pregnant takes how long?"
"需要" means "to need" here, and that's probably how we say "to take" in Chinese because there is no direct translation for this verb.