Calculating distance of comet C/2019 Y4 (ATLAS)
It appears that you are doing a simple parallax calculation, using a baseline obtained from the Earth's rotation over an hour. You appear to be neglecting the most significant change, the motion of the comet.

If you plot the position of C/2019 Y4 in SkySafari, you will see that around this date the comet's location against the star background shifts about 37 arc minutes per day, or a bit over 1.5 arc minutes per hour. The location is based on the orbital elements of the comet (MPEC 2020-C76), but also includes the effect of the Earth moving in its orbit, as mentioned in the comments.

There is no simple way of determining the distance of a solar system object from two position measurements alone. A rough estimate of the orbital elements requires at least three position and time measurements; the MPC orbital elements referenced above are based on many observations over several months.