Chapter 9 in the book of Daniel continues the record of history, and the dreams, visions and revelations that God gave through His prophet. This chapter covers a period under the rule of Darius the Mede who conquered Babylon. (All bold are my emphases added. Square brackets [ ] indicate meanings of words. King James Version Easy-Reading Bible (KJVER) used.)
Daniel 9:1 In the first year of Darius the son of Ahasuerus [538 B.C.], of the seed of the Medes, which was made king over the realm of the Chaldeans;
God told Jeremiah that the nation of Judah (the kingdom of Israel had already been conquered due to their idolatry) would be taken into captured by the Babylonians (Chaldeans) and taken into captivity for 70 years (Jeremiah 25:11) after which God would restore them and return them to Jerusalem (Jeremiah 29:10). Daniel was living in exile and I suppose it was only natural to want to know when the exile would end. God enlightened him through divine knowledge but it was a lot more than just an answer to that simple question.
Daniel 9:2 In the first year of his reign I Daniel understood by books the number of the years, whereof the word of the LORD came to Jeremiah the prophet, that He would accomplish seventy years in the desolations [ruin] of Jerusalem.