The energy refurbishment of residential heating and cooling systems is crucial to achieve the carbon neutrality expected by 2050. In this framework, many researchers are developing low-temperature district heating and cooling systems, integrated with renewable technologies. In particular, fourth-generation district heating and cooling systems are largely used, and a considerable number of these systems have been installed in the last few years. This is due to the wide use of heat pumps and low-temperature heating terminals, such as radiant floors and fan coils. Fifth generation district heating and cooling systems include several significant advancements with respect to the previous technology. This research proposes a thermoeconomic comparison between fourth generation and fifth generation district heating cooling networks, including ground-source heat pumps, supplying heating and cooling energy to a residential district located in Leganes, Madrid. The thermal load of the residential district network is simulated by means of detailed models of the buildings. In the proposed systems, the electric load is partially met by a 3 MW photovoltaic field. The dynamic simulation model of such districts is developed in TRNSYS18, including detailed models for each component. Both the analysed technologies achieve very promising results from both economic and energy points of view. The Primary Energy Saving for the 4th and 5th generation districts are equal to 97% and 81%, respectively. Finally, 4th and 5th generation networks determine a reduction of the CO2 emissions by the 98% and the 87%, respectively. The development of innovative district heating and cooling systems is crucial for the reduction of the environmental impact of buildings sector. However, for residential applications, novel 5th generation networks do not exhibit a better energy and economic performance with respect to mature 4th generation networks, due to the scarce simultaneous heating and cooling demand.