This study develops a robust ensemble machine learning methodology for predicting average annual salinity by combining multiple machine learning algorithms. Salt concentration is a crucial water quality indicator, and salinity issues cost $300 million annually in the U.S. Irrigated agricultural lands in the Upper Colorado River Basin contribute excessively to dissolved solid loads despite covering less than 2% of the basin area. The economic impact and complex relationship between irrigation practices, groundwater dynamics, and salinity levels necessitate improved predictive capabilities at river basin scales. Using twenty years of data from 150 watersheds, eleven machine learning algorithms were evaluated through both random and spatial cross-validation approaches, with Extreme Gradient Boosting, Gradient Boosting, and Random Forest emerging as top performers. Bayesian Model Averaging and stacked generalization were employed to create ensemble models, demonstrating enhanced performance validity. The BMA ensemble achieved better spatial generalization compared to individual models while requiring significantly less computational resources than stacking. Model uncertainty analysis revealed that BMA provided the most stable predictions among all approaches. Soil electrical conductivity and calcium carbonate content emerged as the most important predictors, followed by river flow. The resulting spatially distributed predictions revealed distinct patterns in sulfate loads and concentrations across sub-basins, providing insights for targeted salinity management. This study demonstrates the effectiveness of ensemble machine learning approaches for robust salinity prediction while highlighting the importance of comprehensive uncertainty assessment and spatial validation in environmental modeling applications.