Linear-Time Algorithms for the Generalized Coloring Reconfiguration Problem