Borehole heat exchanger is essential component in ground-source heat pumps (GSHPs) for developing geothermal energy, where device efficiency depends on the thermal conductivity of soil. Although the thermal response test is generally used to measure this parameter, its time-consuming and susceptibility to test conditions can impact the accuracy of the test. To address this issue, the study conducted shallow geothermal surveys to establish a comprehensive dataset, enabling the construction of the in-situ thermal conductivity predictive model. By selecting seven input features, four classic tree-based ensemble learning models and stacking algorithms were used. Among all the post-tuned models examined, XGBoost-RF emerged as the standout performer, boasting an impressive R2 value of 0.9809 along with the lowest RMSE and MAE. Notably, it demonstrated generalization capabilities, with errors consistently staying within 5 % during the validation process. Additionally, the SHapley Additive exPlanations (SHAP) was used to enhance the interpretability of the model. Among these, the weighted thermal conductivity of the geotechnical was the most influential feature, while groundwater conditions such as permeability coefficient and aquifer thickness were also significant factors. This study provides a rapid and precise prediction of regional in-situ thermal conductivity. It leads to effective decision-making in the design stage of GSHPs.