Nodal analysis in simple circuit
If J5 is a current source, the voltage U will not depend on G5.  The correct KCL at node 2 is:

$$(U - E_4)G_2 + (U - E_1)G_1 + J_5 = 0$$

Note that there is no G5 in the above expression.  This is due to the fact that it is series with a current source.

Also, note that G3 is not in the above expression and this is because it is in parallel with a voltage source.



As an aside, this type of problem is easily solved by using superposition.  Since there are three sources, there will be three terms in the superposition which are, by inspection:

$$U = E_1 \dfrac{G_1}{G_1 + G_2} +  E_4 \dfrac{G_2}{G_1 + G_2} - \dfrac{J_5}{G_1 + G_2}$$