Version 1 for adjacency matrix input. See below for tabular data input. Error reports and general feedback welcome.
Version 2, for tabular data.
"here’s where it’s assumed to be undirected"
This fails to account for the fact D has closest neighbor A does not imply A has closest neighbor D (it does not, A has B as closest neighbor).
Thanks for looking! Actually, D-A is included in edgepairs as {A, D}. The weight for that edge is then found in edgepairweights. See also the final output. I've only tested on tiny examples though. Next up are some with 100's of vertices, then on to the 1000's.
I'm curious though if weighted graphs are supported by NearestNeighborGraph[] ? https://community.wolfram.com/groups/-/m/t/1983316