Solution (source code)

= Solution

Take $f<g$ in $I=\mathbb Q^\lambda$ and let $\alpha$ be their first differing coordinate. Choose $r\in\mathbb Q$ with $f(\alpha)<r<g(\alpha)$, copy their common initial segment below $\alpha$, put $r$ at $\alpha$, and put zero at every later coordinate. The resulting eventually zero element lies strictly between $f$ and $g$, so $J$ is dense.

For each $\mu<\lambda$, the eventually zero functions supported below $\mu$ number at most
$$
|\mathbb Q|^{|\mu|}=2^{|\mu|}.
$$
Minimality of $\lambda$ gives $2^{|\mu|}\leq\kappa$ for every $\mu<\lambda$. Also $\lambda\leq\kappa$, since $2^\kappa>\kappa$. Taking the union over $\mu<\lambda$ therefore gives $|J|\leq\kappa$.