KNN does not take into account the actual magnitude of the distance Suppose I have 3 two dimensional points $(0, 0), (10000000, 0), (-1, 0)$ and $(0, 0)$ has label 1.0. If we were to use 1-NN to predict the label for $(10000000, 0), (-1, 0)$, then the answer for both are $1.0$. This does not make sense since the actual distance (Euclidean distance) from $(10000000, 0)$ to $(0,0)$ is way larger than the distance from $(-1,0)$ to $(0,0)$. How could their prediction result be the same? Intuitively, we should be more confident predicting the label of $(-1, 0)$ to be 1.0. Is there a way to reflect this confidence?

We actually should not be more confident in one of the label assignments because according to the assumption made by our learner, both label assignments are equally valid; for a $k$-NN classifier we $k=1$ we assign each unlabelled item to the class of its closest neighbour. That is because we rely strongly on the contiguity hypothesis: "items of the same class form a contiguous region and regions of different classes do not overlap."
For $k>1$, we assign each new item to the majority class of its $k$ closest neighbours with the rationale being that based on the contiguity hypothesis, an item will have the same label as the majority of other known items located in its neighbourhood. We can have a probabilistic output (i.e. quantification of confidence) based on the fraction each class. This brings back to the original example for $k=1$ presented by the OP. The prediction for both unlabelled points has to be the same because there is no other alternative.
As an immediate work-around, we could define some radius $d$ outside which there is no concept of neighbourhood. This would be akin to find use DBSCAN to label points as inliers or outliers and then use 1NN to classify inlier points only. More formally, there are methodologies like Hubness Information k-Nearest Neighbor (HIKNN (2009)) where all neighbours are not "treated equally" extending standard $k$-NN assumptions (and have subsequent impact to our outputs). There is also a reasonable literature on proximity graph methods for nearest neighbours (2020) if one wants to dig this deeper.
