Role of spacer cations and structural distortion in two-dimensional germanium halide perovskites