Here's the quote from Deathly Hallows:
Neither Dumbledore nor Grindelwald ever seem to have referred to this brief boyhood friendship in later life. However, there can be no doubt that Dumbledore delayed, for some five years of turmoil, fatalities, and disappearances, his attack upon Grindelwald. Was it a lingering affection for the man or fear of exposure as his once best friend that caused Dumbledore to hesitate? Was it only reluctantly that Dumbledore set out to capture the man he was once so delighted he had met?
We know that they met after Albus met Grindelwald after he graduated from Hogwarts, which was in 1899. In the late summer of that year, Ariana was killed, which was the last time they met. This puts their legendary duel, according to this quote, in 1904. However, we all know the duel happened in 1945, which is more than four decades after 1904.