It took over a month for the cold to go away.

Literal

Cold [subject-が] heal [purpose-のに] one-month more-than took [explanatory-んだ].

一か月以上かかったんだ — the explanatory んだ adds a narrative/confessional tone. This is someone telling their story.