Let $n=k+k^k$ and let $X$ take each element $1\le j\le k$ with probability $1/k-1/k^2$. Let the remaining $k^k$ elements have probability $1/k^{k+1}$. Let $g(i)=\min(k+1,i)$. We now have $\mathbb P(X\ne Y)=\mathbb P(X>k)=k^k/k^{k+1}=1/k$, which converges to 0 as required. We have $$ \begin{split} H(X)&=-k(1/k-1/k^2)\log (1/k-1/k^2)-k^k/k^{k+1}\log (1/k^{k+1}) \cr &= (1-1/k)(\log k-\log(1-1/k))+(1/k)(k+1)\log k\cr &=2\log k+O(\log k/k), \end{split} $$ which converges to $\infty$ as required. Finally, given $Y$, $X$ is known if $Y$ is in the range $\{1,\ldots,k\}$. But if $Y$ takes the value $k+1$ (which occurs with probability $1/k$), then $X$ takes one of $k^k$ values with equal probability. Hence $H(Y|X)=(1/k)\log k^k=\log k$. In particular, we have $$\frac{H(Y|X)}{H(X)}\to\frac 12. $$