You will need to buy a complete groupset. The SRAM 1x drivetrains have an optimized geometry where the upper pulley is moved slightly to the back. Furthermore the 1x drivetrains from SRAM can't compensate for the chain movement to the side caused by a shift with the deraileur.
As you can see in the links the Rival 1x deraileur is completly different to the Rival 22 deraileur. < <
I think even the shifters need to be changed as I am not sure if the use the same pull ratio. The 1x road drivetrains are derived from the MTB stuff.