Influence of gas density distribution on the pinch process in gas-puff Z-pinch scheme