QuantumQuest said:
The relationship between kinetic energy - momentum for a free electron is ##T = \frac{p^{2}}{2m}##. So, from this, we can find the momentum ##p##:
##p = \sqrt{2mT} = \sqrt{2 \times 9.1 \times 10^{-31} \times 1.6 \times 10^{-19} \times 10^{3}\frac{kg^{2} m^{2}}{s^{2}}} \approx 17.064 \times 10^{-24} \frac{kg m}{s} ##
Now, we can find the De Broglie wavelength: ##\lambda = \frac{h}{p} = \frac{6.625 \times 10^{-34}}{17.064 \times 10^{-24}} m\approx 0.039 nm##
This result is correct, because 1keV is non-relativistic for electrons, since electron rest mass is around 500keV.
On the other hand one can solve this exercise using the equation OP wanted to use: E² = m²c⁴ + p²c²
He said the energy (meaning the kinetic energy) of the electron is one keV. Thus 1keV = E - mc² = ##\sqrt{m²c⁴ + p²c²} -mc²##. If OP solves this equation, then OP can insert it in the De Broglie wavelength formula:
$$p² = \frac{1}{c²}(1keV + mc²)² - m²c² => p = \sqrt{ \frac{1}{c²}(1keV + mc²)² - m²c² } \approx 1.70933440*10^{-23}kg \frac{m}{s}$$
And so ##\lambda = h/p \approx 0.038764033nm##
Both results, of course, agree
EDIT: Not trying to be pedant, but because I want to emphasize the minute differences between both methods I will recalculate what QuantumQuest already did, but with higher precision:
non-relativistic:
##p \approx 1.70849875*10^{-23}kg \frac{m}{s} \approx 31.9687keV/c##
##\lambda = h/p \approx 0.038782993nm##
relativistic:
##p \approx 1.70933440*10^{-23}kg \frac{m}{s} \approx 31.98434keV/c##
##\lambda = h/p \approx 0.038764033nm##