The operation of the subway system necessitates a comprehensive understanding of passenger flow characteristics at station locations, as well as a keen awareness of the average travel distances at these stations. Moreover, the travel distances at the station level bear a direct relationship with the built environment composed of land use characteristics within the station’s catchment area. To this end, we selected the land use features within an 800 m radius of the station (land use area, distribution of points of interest, and the surrounding living environment) as the influencing factors, with the travel distances at peak hours on the subway network in Xi’an as the research subject. An improved SSA-XGBOOST-SHAP interpretable machine learning framework was established. The research findings demonstrate that the proposed enhanced model outperforms traditional machine learning or linear regression methods in terms of R-squared, MAE, and RMSE. Furthermore, the distance from the city center, road network density, the number of public transit routes, and the land use mix have a pronounced influence on travel distances, reflecting the significant impact that mature built environments can have on passenger attraction. Additionally, the analysis reveals a notable nonlinear relationship and threshold effect between the built environment variables comprising land use and the travel distances during peak hours. The research results provide data-driven support for operational strategy management and line capacity optimization, as well as theoretical underpinnings for enhancing the efficiency and sustainability of the entire subway system.