In this study, the genetic algorithm (GA) and an analytical technique are used to properly connect the distributed energy system (DES) to the distribution network of the Federal Capital Territory (FCT). A power flow solution is used to obtain the losses and voltages assigned to the chromosomes as the fitness value for the GA to determine the best locations for the DES. Subsequently, the analytical method is used to calculate the capacities of the DES, corresponding to each location obtained using the GA. The effectiveness of the technique is examined on IEEE 33 and 69 buses, and the results demonstrate a loss reduction of 69.19%, the least voltage of 0.975 pu for the 33-node, and a 70.22% loss reduction with the least voltage of 0.985 pu for the 69-node. The suggested technique is applied to the FCT distribution network, and the results show a 70% voltage improvement and 14.05% loss reduction.