Energy pile groups transmit geothermal energy and have attracted widespread attention as one of new building energy-saving technologies. Accurately predicting the time-dependent behaviors of energy pile groups is a challenge, given the complex thermal and mechanical interactions between piles, surrounding soils and the pile cap. This study presents a semi-analytical solution for analyzing energy pile groups within heat exchangers. Utilizing the transformed differential quadrature method, a flexible coefficient matrix for the saturated surrounding soils is acquired, which accounts for both consolidation and heat transfer. The piles are segmented, and the discrete solving equations considering thermal stresses and expansion are formulated. To accurately reflect the interactions among piles-to-piles, piles-to-soils and piles-to-pile cap, the coupled matrix equations are constructed with involving both the displacement coordination and the force equilibrium at the pile-soil interface as well as the pile cap. The validity of the proposed solution is confirmed through comparisons with results from onsite tests and simulations using COMSOL. Pivotal parameters including temperature variations, pile spacing, and the relative stiffness are discussed through examples. Compared with traditional simulation and field test, the proposed solution enables fast and accurate prediction of displacement and load distribution across pile groups, facilitating the safety evaluation of heat exchangers.