It took three weeks to get over the flu.

Literal

Flu [object-を] cure [purpose-のに] three-weeks took.

インフルエンザを治すのに三週間かかりました — のに here means 'for the purpose of.' かかる means 'to take (time/money).' インフルエンザ is a direct borrowing from the medical term.