The decision by the GOP-controlled legislature follows similar moves by about two dozen other states. Kansas’s Democratic governor had vetoed the bill last year.