Spectral confocal measurement technique utilizes axial dispersion encoding to obtain sample surface information with ultra-high measurement resolution. However, the measurement range and linearity are mutually constrained, making it difficult to improve both simultaneously. To overcome this limitation, based on fiber optic transmission theory, a dispersion model for white light sources is established. Primary dispersion of each wavelength is achieved using gradient-index (GRIN) fibers, while secondary dispersion is implemented through a lens group designed to achieve linear dispersion. The system's measurement range is expanded, and nonlinearities in the GRIN fiber's pre-dispersion are compensated for by this design. Subsequently, the XGBoost algorithm is adopted to train and extract features from the established constraint relations between the GRIN fiber, secondary dispersive objective, and system performance characteristics. Dispersion control compensation and optimization are achieved by this approach, thereby enabling the coordination of the constraint relation between the expansion of the dispersion range and the improvement of axial resolution, and resulting in the acquisition of highly linear dispersion, which further enhances system performance. Through theoretical analysis and simulation experiments, the dispersion performance and application feasibility of GRIN fibers under white-light conditions are investigated in this paper. The measurement range of the spectral confocal displacement measurement system is further expanded, and the dispersion linearity is improved accordingly. The results show that an axial linear dispersion of 4.045 Spectral confocal measurement technique utilizes axial dispersion encoding to obtain sample surface information with mm is achieved with a dispersion linearity of 99.89%.