This study presents a differential equation-based algorithm for locating single line-to-ground faults in power distribution networks, focusing on minimizing error due to harmonic distortion. The proposed method incorporates various filtering techniques, demonstrating that the continuous wavelet technique filter yields the most accurate fault location results with a mean average error of less than 5%. Simulations conducted using the alternate transients program illustrate the algorithm's effectiveness in real-world scenarios.