I don't understand the concept of K-Nearest Neighbors

If I want to find the best price for my listing, why use k-Nearest Neighbors (ie take into consideration the average price of only k listings) and not take the average price of all the listings with 0 distance from my listing?

One reason is that having plenty of zero distance neighbors is an ideal scenario. Many times we aren’t as lucky, you may not even get any zero distance neighbor, in which case you’ll need to decide how many you’ll want to use, that is, you need to decide on a k.