Here is an argument for the equivalence. It's easier in the case that $\kappa=\mathrm{card}(\gamma)$ is a regular cardinal, so let's consider that first. Fix a J'onsson function $f$ for $\kappa$. Fix a bijection $\pi:\gamma\to\kappa$. If $X$ is a set of ordinals, write ${^{\omega\uparrow}}X$ for the set of strictly increasing functions $a:\omega\to X$. Then define a function $g:{^{\omega\uparrow}}\gamma\to\gamma$ setting $g(a)=\pi^{-1}(f(\pi\circ a))$, if $\pi\circ a:\omega\to\kappa$ is strictly increasing, and $g(a)=0$ otherwise. I claim this works. For let $A\subseteq\gamma$ with $\mathrm{card}(A)=\kappa$. We have to see that $g``{^{\omega\uparrow}}A=\gamma$. So we may assume that $A$ has ordertype $\kappa$. Note then that because $\kappa$ is regular, there is a set $B\subseteq A$ of ordertype $\kappa$ such that $\pi\upharpoonright B$ is strictly increasing. But then for every $a\in{^{\omega\uparrow}}B$, $\pi\circ a$ is strictly increasing, and letting $B'=\pi``B$, then conversely, for every $b\in{^{\omega\uparrow}}B'$, we have $b=\pi(a)$ for some $a\in{^{\omega\uparrow}}B$. But $f``{^{\omega\uparrow}}B'=\kappa$, and therefore $g``{^{\omega\uparrow}}B=\gamma$, which suffices.
In the case that $\kappa$ is singular, there is a variant of the above argument. Suppose $\kappa=\mathrm{card}(\gamma)$ is a singular cardinal. Given $f$ for $\kappa$ and a bijection $\pi:\gamma\to\kappa$, define $g$ just like before. I claim this works again. For like before, given a set $A\subseteq\gamma$ of cardinality $\kappa$, we can find a set $B\subseteq A$ of ordertype $\kappa$ such that $\pi\upharpoonright B$ is strictly increasing, which suffices like before.
To see there is such a $B$, let $\mu=\mathrm{cof}(\kappa)$ and fix a strictly increasing sequence $\left<\kappa_\alpha\right>_{\alpha<\mu}$ of regular cardinals, cofinal in $\kappa$, with $\mu<\kappa_\alpha<\kappa$ for each $\alpha<\mu$. We may assume that $A$ has ordertype $\kappa$.
I claim there is a sequence $\left<A_\alpha\right>_{\alpha<\mu}$ such that for each $\alpha<\mu$, we have $A_\alpha\subseteq A$, $A_\alpha$ has ordertype $\kappa_\alpha$, $\pi``A_\alpha$ is bounded strictly below $\kappa$, $\pi\upharpoonright A_\alpha$ is strictly increasing, and for all $\alpha<\beta<\mu$, we have $\sup(A_\alpha)<\min(A_\beta)$
and $\sup\pi``A_\alpha<\min(\pi``A_\beta)$. For let us construct such a sequence recursively.
For $\alpha=0$, let us find an appropriate $A_0$. Well, because $\mu<\kappa_0$, there must be $\beta_0<\mu$ such that $(\pi``A)\cap\kappa_{\beta_0}$ has cardinality $\geq\kappa_0$. Fix such an $\beta_0$. For similar reasons, there must be some $\xi_0<\sup A$
such that $(\pi``(A\cap\xi_0))\cap\kappa_{\beta_0}$ has cardinality $\geq\kappa_0$. Fix such a $\xi_0$. Let $A'_0$ be a set of ordertype $\kappa_0$ such that $A'_0\subseteq A\cap\xi_0$ and $\pi``A'_0\subseteq\kappa_{\beta_0}$.
Then as in the regular case, we can thin $A'_0$ out to a set $A_0\subseteq A'_0$ of ordertype $\kappa_0$ such that $\pi\upharpoonright A_0$ is strictly increasing. (Enumerate a strictly increasing sequence $\left<\eta_\delta\right>_{\delta<\kappa_0}\subseteq A'_0$ by letting $\eta_0$ be the $\eta\in A_0$ such that $\pi(\eta)$ is minimal, then let $\eta_1$ be the $\eta\in A_0\setminus(\eta_0+1)$ such that $\pi(\eta)$ is minimal such, etc. Then set $A_0=\{\eta_\delta\}_{\delta<\kappa_0}$.)
Given $\left<A_\alpha\right>_{\alpha<\theta}$ where $\theta<\mu$, note that $A'=\bigcup_{\alpha<\theta}A_\alpha$ is bounded in $A$ and $\pi``A'$ is bounded in $\kappa$. Using this, it is easy to slightly modify the preceding argument to obtain a suitable $A_\theta$.
Now let $B=\bigcup_{\alpha<\mu}A_\alpha$. So $B\subseteq A$, $B$ has ordertype $\kappa$, and note that $\pi\upharpoonright B$ is strictly increasing.