This is a very nice question that reveals a subtle point about iterating ultrapowers. Namely, the issue is that in order to iterate the ultrapower construction, one needs the ultrafilter $U$ to be weakly amenable to the structure, which means that the structure has $\{\alpha\lt\kappa\mid X_\alpha\in U\}$, whenever it has $\langle X_\alpha\mid\alpha\lt\kappa\rangle$. In other words, the structure knows about how the ultrafilter works on its size $\kappa$ families of sets. The need for weak amenability arises naturally when you want to define the second-step of the ultrapower, specifically, when you want to define the image of $U$ on the ultrapower structure. One can show that weak amenability amounts to the assertion that the power set of $\kappa$ does not enlarge under the ultrapower. And this is clearly stronger than weak compactness, since it supports reflection arguments, like this: if $j:M\to N$ has critical point $\kappa$ and $P(\kappa)^M=P(\kappa)^N$, then $\kappa$ must have the tree property in $N$, since every $\kappa$-tree has a $\kappa$-branch in $N$, and the trees and branches are the same in the two models. Thus, there must be many weakly compact cardinals below $\kappa$. The iterable cardinals, introduced by Victoria Gitman, are concerned precisely with this issue.
Getting back to your question, the situation is that in Jech's context, with a weakly compact cardinal, while you do get the $\kappa$-complete ultrafilter, nevertheless you do not in general get an ultrafilter that is weakly amenable to the structure $L_\alpha$ you mention. In particular, the power set of $\kappa$ in $L_\alpha$ and the target structure $L_\beta$ may not be the same. And without weak amenability, there is no natural way to define the ultrafilter on the ultrapower and no way to continue the iteration, even for two steps.
Meanwhile, in Kanamori's context, the weak amenability hypothesis is a part of the framework in chapter 19, and so there is no contradiction here.