Geological parameters of soil exhibit spatial variability. Inverse analysis allows the acquisition of accurate spatial distributions of key geological parameters, which is crucial for structural safety assessment. In this study, an ensemble Kalman filter (EnKF) is employed in the context of data assimilation. Random fields are used as the initial input ensembles for the algorithm. The present study effectively integrates the ensemble Kalman filter with the numerical simulation software ABAQUS, enabling the inversion of parameter fields under various operating conditions. An in-house Python code script is developed to control ABAQUS for finite element computations and to obtain observations at target points. During the stepwise computation process, the algorithm can utilize newly acquired observations to accelerate the convergence of the parameter field to the true field. The effectiveness of the algorithm is validated, and the method is applied to a case study of double-tunnel excavation and a stepwise excavation analysis of a three-layered slope. The impact of the number of ensemble members and the ratio of the horizontal correlation scale to the vertical correlation scale of random fields on the effectiveness of updating the parameter field have also been investigated.