
simulate this circuit – Schematic created using CircuitLab
The port impedance of an ABCD matrix, with an impedance applied to the opposite port, is easily derived from the definition:
$$
\begin{eqnarray}
V_1 = &\, A V_2 + B I_2 \\
I_1 = &\, C V_2 + D I_2
\end{eqnarray}
$$
From the definition, we see that a "standalone impedance" is meaningless, because an ABCD matrix is strictly relational (port 1 in terms of port 2, or vice versa by its inverse). We can have an impedance (or conductance) if we stipulate that port 2 must be open-circuit (V2 = V1, I2 = 0; A = 1, B = 0, C = Y, D = 0), or short-circuit (V2 = 0, I2 = I1; A = 0, B = Z, C = 0, D = 1)[1], but we can preferably use the matrix as it was designed to do, and apply the impedance directly.
Applying an impedance to port 2, we have:
$$
\begin{eqnarray}
V_2 = &\, I_2 Z_2 \\
Z_1 = &\, \dfrac{V_1}{I_1}
\end{eqnarray}
$$
Thus we obtain,
$$Z_1 = \frac{A Z_2 + B}{C Z_2 + D}$$
Further reading: A Review of ABCD Parameters
[1] I suppose the zero parameters (B and D, or A and C) are really undefined, given the assumption that the respective port 2 value is zero. But I would rather not have to remember assumptions, and just work with it properly.