The distribution network is a crucial component of the power system as it directly connects to users and serves the purpose of distributing power and balancing the load. With the integration of new energy sources through distributed generation (DG), the distribution network has undergone a transformation from a single power radial network into a complex multi-source network. Consequently, traditional fault location methods have proven inadequate in this new network structure. Therefore, the focus of this paper is to investigate fault location techniques specifically tailored for DG integration into distribution networks. This paper analyzes how fault conditions impact the characteristics of single-phase grounding faults and extracts spectral feature quantities to describe differences in zero-sequence currents under various fault distances. This paper also proposes a fault location method based on centroid frequency and a BPNN (back propagation neural network). The method uses centroid frequency to describe the features of zero-sequence currents; to simulate the mapping relationship between fault conditions and spectral features, BPNN is employed. The mapping relationship differs for different lines and distribution networks. When a line faults, the spectral features are calculated, along with the transition resistance and fault closing angle. The corresponding mapping relationship is then called upon to complete distance measurements. This location method can be applied to various types of distribution lines and fault conditions with high accuracy. Even with insufficient training samples, sample expansion can ensure accuracy in fault distance measurement. We built a distribution network consisting of four feeders with different types and lengths of each line on Simulink and verified the effectiveness of the proposed method by setting different fault conditions. The results suggest that the method has a clear advantage over other frequency domain-based approaches, especially for hybrid lines and feeder lines with branches in distribution networks. Additionally, the method achieves a measurement accuracy within a range of 100 m.