Momentum vector transformation
The objects that we call vectors in Euclidean space are, in more general situations, actually two possible different types of objects. If you change coordinates ($q_i\to q_i'$), the components change with different rules, according to how the Jacobian $\Lambda_{ij} = \frac{\partial q'_i}{\partial q_j}$ (using your notation) appears.
1) Vectors (or tangent vectors, or contravariant vectors):
Velocities are an important example. If a system has a trajectory $q_i(t)$, its velocity is $v_i(t)=\frac{dq_i}{dt}$. If you change coordinates, you get
$$v_i'=\frac{dq_i'}{dt}=\sum_j\frac{\partial q_i'}{\partial q_j}\frac{dq_j}{dt}=\sum_j \Lambda_{ij}v_j.$$
2) Co-vectors (or cotangent vectors, or one-forms, or covariant vectors):
The gradient of a function is an important example of this. If $f(q)$ is a function on configuration space, its gradient is $\nabla f_i=\frac{\partial f}{\partial q_i}$. Change coordinates to get
$$ (\nabla f)'_i=\frac{\partial f}{\partial q'_i}=\sum_j\frac{\partial q_j}{\partial q'_i}\frac{\partial f}{\partial q_j}=\sum_j \Lambda_{ji}^{-1}\nabla f_j. $$
These two different transformation laws define the two different types of vector. We don't worry about this in Euclidean space, because there we often just do rotations, where the two concepts happen to coincide.
The transformation is as you've written because the momentum is really a covector on configuration space. You can see this for example, from the fact that $\frac{dp_i}{dt}=-\frac{\partial H}{\partial q_i}$.
I) The (Lagrangian) canonical conjugate momentum
$$\tag{1} p_i ~:=~\frac{\partial L(q,\dot{q},t)}{\partial \dot{q}^i} $$
transforms as a one-form/co-vector
$$\tag{2} p_i~=~ p^{\prime}_j \frac{\partial f^j(q,t)}{\partial q^i} $$
under (possibly time-dependent) position coordinate transformations
$$\tag{3} q^i~\longrightarrow~ q^{\prime j}~=~f^j(q,t)$$
in the position manifold $M$ (aka. as the configuration space). The Lagrangian $L(q,\dot{q},t)$ and the velocity $\dot{q}^i$ transform a scalar
$$\tag{4} L(q,\dot{q},t)~=~L^{\prime}(q^{\prime},\dot{q}^{\prime},t) $$
and an affine vector
$$\tag{5} \dot{q}^{\prime j} ~=~ \dot{q}^i \frac{\partial f^j(q,t)}{\partial q^i} +\frac{\partial f^j(q,t)}{\partial t}$$
under general position coordinate transformations (3), respectively. Equation (5) implies that
$$\tag{6} \frac{\partial \dot{q}^{\prime j}}{\partial \dot{q}^i} ~\stackrel{(5)}{=}~\frac{\partial f^j(q,t)}{\partial q^i}. $$
Equation (2) follows because of eqs. (1), (4), (6) and the chain rule:
$$\tag{7} p_i ~=~\frac{\partial L(q,\dot{q},t)}{\partial \dot{q}^i} ~=~ \frac{\partial \dot{q}^{\prime j}}{\partial \dot{q}^i} \frac{\partial L^{\prime}(q^{\prime},\dot{q}^{\prime},t)}{\partial \dot{q}^{\prime j}} ~=~ \frac{\partial f^j(q,t)}{\partial q^i}p^{\prime}_j.$$
II) Let us mention for completeness that in the Hamiltonian formalism the momenta $p_i$ are independent variables. The set of transformations (2) and (3) is not the most general phase space transformation
$$\tag{8} (q^i,p_j)~\longrightarrow~(q^{\prime i},p^{\prime}_j) =(f^i(q,p,t),g_j(q,p,t)), $$
even if the phase space is the cotangent bundle $T^{\ast}M$ and even if we restrict to symplectomorphisms.
One may check that a phase space transformation (8) of the form (2) and (3) is a symplectomorphism. In fact, it is a type 2 canonical transformation (CT) with generating function
$$\tag{9} F_2(q,p^{\prime},t)~=~ p^{\prime}_j f^j(q,t). $$
For the definition of a CT, see also this Phys.SE post. From a Hamiltonian point of view, the set of transformations (2) and (3) are the transformations that respect the fiber structure of the cotangent bundle $T^{\ast}M$. However, we should stress that the full set of symplectomorphisms is vastly bigger than the set of transformations (2) and (3). In other words: The symplectic structure is coarser than the cotangent bundle structure.
Example: The phase space transformation
$$\tag{10} q^{\prime i} ~=~ p_i \quad\text{and}\quad p^{\prime}_j ~=~-q^j $$
is not of the form of eqs. (2) and (3). However, it is a symplectomorphisms and a type 1 CT with generating function
$$\tag{11} F_1(q,q^{\prime},t)~=~ q^{\prime i} q^i. $$
The fact that the upper and lower indices in eqs. (10) and (11) do not match reflects that the symplectomorphism (10) does not respect the fiber structure of the cotangent bundle $T^{\ast}M$.
References:
- M. Nakahara, Geometry, Topology and Physics, 2003; Subsection 1.1.3.