Well, he might get it from Dumbledore. Dumbledore has a way of guiding things in the right direction. He could have arranged for Harry to come across the sword at a crucial moment. Or it could be that the sword was left for Harry by his parents in some magically protected place, and he stumbles upon it while on his quest to kill the dragon.
In many Harry Potter - related stories, the sword of Gryffindor often finds its way to those who are worthy. Maybe in this fanfiction, Harry discovers it in a similar way. It could be hidden in the Sorting Hat, or perhaps it's presented to him by some magical creature that recognizes his need and his courage.
There are multiple possibilities. It could be that the sword was retrieved from the bottom of the lake by Harry himself, showing his courage and determination, just like in the original story where Neville retrieved it. Another option is that the sword was given to Harry by a secret order within Hogwarts, an order that knew he would need it to face the dragon.
It could be an entirely new type of dragon created specifically for this fanfiction. The author might have wanted to introduce a unique dragon with special abilities, like a dragon that can change its color to blend in with its surroundings or one that can breathe not just fire but also some kind of magical ice. Harry would then have an even greater challenge when trying to kill it with the sword.
He might find it in a hidden chamber in Hogwarts. There could be a series of magical puzzles and traps that he has to overcome to get to it.
In some fanfictions, Naruto might obtain the dragon sword through a special quest. Maybe he stumbles upon an ancient temple during one of his missions where the sword is hidden as a powerful artifact, guarded by some kind of magic or traps. He overcomes these obstacles using his ninja skills and determination, and thus gets the dragon sword.
It's possible that there's a hidden stash of Muggle items in Hogwarts, and Harry stumbles upon it. He discovers the gun there, realizes it could be a powerful weapon against Voldemort, and decides to use it.
The dragon sword might give Harry Potter enhanced combat abilities. It could potentially allow him to cut through dark magic defenses more easily, much like how the Sword of Gryffindor could destroy Horcruxes. Maybe it gives him the power to communicate with dragons, since it's a dragon sword, and use their strength in battles against Voldemort and his Death Eaters.
In certain 'Harry kills the dragon' fanfictions, Harry could be given a special magical weapon specifically designed to slay dragons. He might have to go through a series of trials to figure out how to use this weapon effectively. It could be that the weapon has to be powered by his own magic and emotions. Once he masters this, he is able to take on the dragon and kill it. For example, the weapon might need to be charged with his feelings of courage and determination, which are strong in Harry, and then he uses it to strike a fatal blow to the dragon.
In many fanfictions, Harry might use his powerful spells like the Stunning Spell or the Killing Curse if the story allows for such dark magic use. He could also use his intelligence to outwit the dragon, perhaps finding a weakness in its armor or behavior pattern and then using a well - timed spell to defeat it.
He could discover it during a dangerous mission in an ancient ruin. Maybe he was exploring an old ninja stronghold and came across the sword hidden away. It might have been protected by traps and guardians, which he had to overcome to obtain it.
Well, it could potentially give him an edge in combat. Maybe he can use it to defeat dark creatures more easily. For example, if he faces a Dementor, the sword might be able to disrupt its form in a way normal spells can't.
Well, it could be a magical sword like the Sword of Gryffindor. In many fanfics, authors might choose this iconic sword as it has a strong connection to Harry through Gryffindor. It's a powerful weapon against dark magic and has a lot of history within the Harry Potter universe.