J. K. Rowling addresses her use of this in a footnote of the Warlock's Hairy Heart:
The term "warlock" is a very old one. Although it is sometimes used
as interchangeable with "wizards", it originally denoted one learned
in dueling and all martial magic. It was also given as a title to
wizards who had performed feats of bravery, rather as Muggles were
sometimes knighted for acts of valor. By calling the young wizard in
this story a warlock, Beedle indicates that he has already been
recognized as especially skillful at offensive magic. These days
wizards use "warlock" in one of two ways: to describe a wizard of
unusally fierce appearance, or as a title denoting particular skill or
achievement. Thus, Dumbledore himself was Chief Warlock of the
Wizengamot. - JKR
As you see elsewhere in her writings there are numerous examples of Rowling using both words through the books (Chief Warlock of the Wizengamot, The Warlock's Hairy Heart, innumerable counts of wizard), but some excerpts definitely use the words interchangeably:
Records show that witches and wizards in Europe were using flying
broomsticks as early as A.D. 962. A German illuminated manuscript of
this period shows three warlocks dismounting from their brooms with
looks of exquisite discomfort on their faces.
From Quidditch Through The Ages.
Describe the circumstances that led to the formation of the
International Confederation of Wizards and explain why the warlocks of
Liechtenstein refused to join.
From the Order of the Phoenix (an exam question).
Of course, the centuries-old trade in love potions shows that our
fictional wizard is hardly alone in seeking to control the
unpredictable course of love.
From the Warlock's Hairy Heart's postscript, about the man described as a warlock everywhere else.