The Legend of Sleepy Hollow has long been Public Domain. Use anything from Irving's story that you want, including the characters, the town of Sleepy Hollow, and the events of the story. Copy the whole thing verbatim if you want to. So yes, you can set your story in Sleepy Hollow. Or you can have the Headless Horseman in another town. Either way is fine.
Avoid, however, elements not in the original that were used in more modern stories, movies, and TV shows.
The classic example is The Wonderful Wizard of Oz. Baum's original novel is Public Domain because it was first published in 1900, so anything in the book can be used. The popular film, however, is not Public Domain because it was made in 1939. So elements from the film that did not appear in the book cannot be used. Elements such as the ruby slippers.
In the book, they were silver, so you can use silver slippers. In the film, they were ruby, so you cannot use ruby slippers. The current TV shows Supernatural and Once Upon a Time have both recently incorporated Oz elements into their storylines, and both explicitly showed silver slippers. I assume that was because MGM still owns the copyright to the more recognizable ruby ones.