It's not clear to me if you have an issue with loading code on the NanoEvery or if there is an error in your use of map( ) with the analogRead values which is confusing you.
The map() function uses integer math so will not generate fractions, when the math might indicate that it should do so. Fractional remainders are truncated, and are not rounded or averaged.
However, map( ) is easily modified to work with floats using this function which you will need to add to your code.
float fmap(float x, float in_min, float in_max, float out_min, float out_max) {
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}
The code may then be called as:
float val = analogRead(ANALOG_PIN);
float humanReadableVoltage = fmap(val, 0.0, 1023.0, 0.0, 5.0);
The Nano Every has multiple internal reference voltages as well as VDD. You might want to explore using these.
https://www.arduino.cc/reference/en/language/functions/analog-io/analogreference/