John Street
It’s fine for the connection to be in the cupboard next to it, the reason it’s not directly behind is so the cooker will fit flush with the wall behind it. I must stress that any connection of the gas cooker should be carried out by a registered Gas Safe engineer