X-ray observations of kilo-parsec scale jets indicate that a synchrotron origin of the sustained non-thermal emission is likely. This requires distributed acceleration of electrons up to near PeV energies along the jet. The underlying acceleration mechanism is still unclear. Shear acceleration is a promising candidate, as velocity-shear stratification is a natural consequence of the collimated flow of a jet. We study the details of shear acceleration by solving the steady-state Fokker-Planck-type equation and provide a simple general solution for trans-relativistic jets for a range of magnetohydrodynamic turbulent power-law spectra. In general, the accelerated particle population is a power-law spectrum with an exponential-like cut-off, where the power-law index is determined by the turbulence spectrum and the balance of escape and acceleration of particles. Adopting a simple linearly decreasing velocity profile in the boundary of large-scale jets, we find that the multi-wavelength spectral energy distribution of X-ray jets, such as Centaurus A and 3C 273, can be reproduced with electrons that are accelerated up to $sim$ PeV. In kpc-scale jets, protons may be accelerated up to $sim$ EeV, supporting the hypothesis that large-scale jets are strong candidates for ultra-high-energy-cosmic-ray sources within the framework of shear acceleration.