Going back to the source:
This text (it’s “Bevis of Hampton”; so this tried and tested dragon-repelling method is even older than 400 years; got my texts confused yesterday) doesn’t say anything about taking a pure virgin and dipping her into the well. But if you think about it, it’s not really likely that any virgin would work, is it? Or dragon-repelling wells wouldn’t be so very rare. So I guess it only works if it is a very virtuous virgin, pure of heart and all that.
Just a word to the wise: The dragon-repelling wells should not be confused with other magical wells such as those in Ranma 1/2. If you jump into those it won’t keep the dragon away, and instead you’ll turn into a panda bear. (If you’re lucky. If you’re not so lucky, you might turn into a piglet.)