Question: why can the sword of gryffindor destroy horcruxes?
Answer: The sword of gryffindor was a Goblin made item. And Goblin made items absrob anything that makes them stronger. So when Harry killed the basilisk with this sword , the sword absorbed the venom and got imbued with the power of basilisk venom. So this sword was able to destroy horcruxes.