In combating climate change, an effective demand-based energy supply operation of the district energy system (DES) for heating or cooling is indispensable. As a consequence, an accurate forecast of heat consumption on the consumer side poses an important first step towards an optimal energy supply. However, due to the non-linearity and non-stationarity of heat consumption data, the prediction of the thermal energy demand of DES remains challenging. In this work, we propose a forecasting framework for thermal energy consumption within a district heating system (DHS) based on kernel Support Vector Regression (kSVR) using real-world smart meter data. Particle Swarm Optimization (PSO) is employed to find the optimal hyper-parameter for the kSVR model which leads to the superiority of the proposed methods when compared to a state-of-the-art ARIMA model. The average MAPE is reduced to 2.07% and 2.64% for the individual meter-specific forecasting and for forecasting of societal consumption, respectively.