In recent decades, wind turbines (WT) and solar panels (PV) have been integrated into electrical power systems, particularly within power distribution networks. Given the rising energy demands and the variability of renewable energy sources, the design, operation, and control of power networks have become increasingly challenging. This research focuses on the reduction of technical losses and the enhancement of voltage levels within distribution systems by harnessing the capabilities of solid-state transformers (SST) to provide dual-reactive power support. It assesses the impact of load demands and the integration of distributed generation (DG) units, such as PV and WT, while incorporating SST into the distribution system. The study employs the K-medoid algorithm in a data-driven approach to analyze load demand, solar irradiance, and wind speed. Six test cases are formulated to evaluate the synergistic effects of combining SST with DG technologies, including wind turbines, PV arrays, and batteries. A gorilla troop optimization (GTO) algorithm is employed to determine the optimal placement and sizing of SST, WT, PV, and BES to optimize voltage levels and minimize energy losses in radial power distribution networks. To validate the results, all six cases are compared against IEEE 33 bus data from radial distribution systems, demonstrating the superior performance of the GTO approach in all cases. This study achieved a significant improvement in the voltage profile compared to the current configuration. Active power losses were cut by 82.36% thanks to the optimization of SSTs with dual reactive power support and variable DG, as opposed to the existing distribution system. Reactive power losses were also reduced by 86.36%, and the voltage profile saw a marked enhancement, rising from 0.92 p.u. to 1.0 p.u., demonstrating a substantial improvement. Reactive power usage decreased by 71.19%. The study presents a novel solution for long-standing problems related to high distribution system losses and low voltage levels by integrating SSTs with DG systems.