This paper presents a new methodology for the optimal integrated planning of medium- and low-voltage distribution systems, considering the location and sizing of distributed generation. The integrated problem is formulated as a mixed-integer nonlinear model and, to solve it, two well-known optimization algorithms (simulated annealing and iterated local search) are used. The intensification and diversification processes are usually the bottleneck of metaheuristic techniques for solving complex problems. To overcome such complexity, a new neighborhood search method based on the Zbus matrix (NSZM) is proposed, to explore the solution space more efficiently and effectively for both algorithms. The proposed methodology is validated and tested on a real distribution system taken from the literature. The results obtained are better than those reported in the literature. To verify the efficiency of the new NSZM method, the Wilcoxon signed ranks test is used to measure the performance behavior of the NSZM method in the two optimization algorithms used. The numerical results demonstrate that the NSZM method enhances both algorithms equally.