Solution: The first passage (Dan. 1:21) does not say Daniel did not continue to live longer. It simply notes that he lived until that glorious year when the Jewish exiles received permission to return to their homeland (cf. Ezra 1:3). The second passage (Dan. 10:1) notes that Daniel also lived even beyond that time.
Further, the word “continued” may imply that he retained his position or continued in Babylon. Although he lived on after Cyrus took over, Daniel would not necessarily have retained his government position with Babylon (cf. Dan. 1:19) after this time, since the Medo-Persians took over.