Seeing as the Torah is still discussing Yisrael's punishment, as is evident from the following Pasuk, why does the Torah insert this Pasuk here?
Seforno: Because it is only some of the people who will confess and do Teshuvah, such as Daniel and Ezra and a few others like them; most of them did not. 1
Ramban #1 (citing Ibn Ezra): The Torah inserts the Viduy here in connection with the following Pasuk, to inform us that Yisrael would ultimately do Teshuvah, as Hashem intended them to when He chastised them by bringing them (back) to the land of their enemies. 2
Ramban #2: Even after they confessed on their sins, 3 Hashem would bring them back to Eretz Yisrael - which they would not capture, 4 and where they would therefore suffer endlessly at the hand of oppressors and enemies. 5
Why does the Torah only mention Viduy, and not a complete Teshuvah, as it does after the K'lalos in Ki Savo
Ramban: This is another of the many proofs that the K'lalos in Bechukosai refer to the era of the first Beis Hamikdash and Churban and the period that followed, 1 and the K'lalos on Ki Savo, to the era of the second Beis-Hamikdash and its Churban, whose termination depends on Yisrael doing Teshuvah. 2
Ramban: Where they tended to recite Viduy without doing genuine Teshuvah