In this context "age" is just a unit of time, and does not mean the same thing as "First Age", "Second Age", etc.
The length of the time in this passage of the Silmarillion was taken from the Annals of Aman.
And the Valar doomed Melkor there to abide for three ages of Valinor, ere he should come forth again to be tried by his peers, and sue once more for terms of pardon. And this was done, and peace returned to the kingdom of Arda; and this was the Noontide of the Blessed Realm. Yet many evil things yet lingered in Middle-earth that had fled away from the wrath of the Lords of the West, or lay hidden in the deeps of the earth. For the vaults of Utumno were many, and hidden with deceit, and not all were discovered by the Valar.
The Annals of Aman - 1100 The Chaining of Melkor
Earlier in the Annals of Aman an "Age of the Valar" is defined as 100 Valian Years:
Thereafter the Valar counted time by the ages of Valinor, whereof each age contained one hundred of the Years of the Valar; but each such year was longer than are nine years under the Sun.
The Annals of Aman - Of the Beginning of Time and its Reckoning
And a Valian Year is defined as 84,000 Sun hours, or 9.582 Sun years:
But as for the Years of the Trees and those that came after, one such Year was longer than nine such years as now are. For there were in each such Year twelve thousand hours. Yet the hours of the Trees were each seven times as long as is one hour of a full-day upon Middle-earth from sun-rise to sun-rise, when light and dark are equally divided. Therefore each Day of the Valar endured for four and eighty of our hours, and each Year for four and eighty thousand: which is as much as three thousand and five hundred of our days, and is somewhat more than are nine and one half of our years (nine and one half and eight hundredths and yet a little).
The Annals of Aman - Of the Beginning of Time and its Reckoning
So an "Age of the Valar" is then 958.2 Sun years, and Melkor spending three ages would thus be about 2,875 years.
It should also be noted that this chronology all reflects the way Tolkien saw things in 1951. In previous versions Melkor was said to be condemned for seven ages (which would have then been 7,000 sun years), and while I'm not sure if Tolkien later kept the "three ages" thing, he would later decide that a Valian Age was 144 Valian Years and that a Valion Year was 144 Sun Years (which would then make three ages equal to 62,000 sun years.)