Take a look at the K2’s User Manual. On page 14-18 there’s a guide that indicates what CC#’s are mapped to each encoder, knob, and Button. Make sure that whatever parameter or function you want to map with a respective control on the K2 that it’s using the same CC# in the “Assign MIDI CC Messages” section of H9 Control. Also, make sure you don’t accidentally map two parameters to the same number.
To simplify things, remember that you can map various parameters of a preset to the ribbon controller, so that with one CC# assigned to the “expression pedal value” you can change many parameters at once. You’ll have to program your expression ranges on H9 Control for this to work. And it works really well.