"I spent too much time doing this task."
That wouldn't be the right place for it. You'd be interrupting the meaning. However, you could put it at the end of the sentence, as a sentence-final "了", which is a colloquial usage that would suggest a presently observed change of state or similar point of emphasis applying to the sentence as a whole.
In the "太 ... 了" structure, "了" can be thought of as a special case of the sentence-final "了", and the idea expressed is that you've observed the situation and this is the emphatic conclusion that you've come too. In such a case you put "太 ... 了" at the end of your sentence or clause (or it acts as your entire sentence) and nothing comes after it.
In the given Duolingo sentence, the "了" after "花" indicates a change of state attached to the verb, and it's often reasonable to interpret this "了" as a sort of past tense.
A second "了", at the end, would attach a presently observed change of state or similar point of emphasis to the entire sentence, and the nuance would change from, basically, "I spent too much time..." to something like "(I conclude that) I have (now) spent too much time...".
I welcome corrections.
After the lesson, on the web version you're given the option to review your answers. If you're using the mobile app and that option doesn't exist, you might want to submit a bug report: