You forget the binding energy, when you take for example a neutron and proton and combine them, the final composite particle's mass will be not equal to the sum of neutron and proton masses, because some mass will be converted into a binding energy, thus when you want to calculate the produced energy of your alpha decay, you should take in account the energy of binding, not just summing up neutron and protons masses, see Nuclear binding energy for details.
An intuitive way to think about above, is to think that nucleons when they are in the atom's nuclei (bidden) they are floating on water (that represents nuclear forces between them), and as you know the weight of the staff is less when they are in water, thus the "weight" of nucleons is less when they are bind.
So the exceed energy can be calculated by:
Binding Energy In of $B_{U_{92}^{238}}=92m_p+(238-92)m_n-m_{U_{92}^{238}}$
Binding Energy In of $B_{Th_{90}^{234}}=90m_p+(234-90)m_n-m_{Th_{90}^{234}}$
Binding Energy In of $B_{\alpha_{2}^{4}}=2m_p+(4-2)m_n-m_{\alpha_{2}^{4}}$
Finally the excess of energy is can be calculated as:
$E_{\gamma}=m_{U_{92}^{238}}-m_{Th_{90}^{234}}-m_{\alpha_{2}^{4}} $