replace buttons in voltage-divider with mosfets
I assume that "Buttons" is your output voltage.

The problem is that the 2N7000 needs a finite gate to source voltage (= Vgs) to turn it on hard in order for it to present a low resistance path. This voltage varies by device but is about 3V minimum for reliable operation.

If the The MOSFET gate is driven with +5V, the MOSFETs will "see" a Vgs of about 5V-Vd (as Vs ~= Vd when the MOSFET is on. As you progress up the divider chain Vd rises and (5-Vd) falls to a point where the MOSFET is not turning on fully.

Solutions


Drive the gates with >= Vd_max + 3V ~+ 8V.
If your multiplexer is unable to provide 8V this will not work.
Use very low Vgsth MOSFETs.
As the max Vd is almost 5V you would need VERY low Vgsth MOSFETS. Not really practical.
Limit Vdmax to about 2V so that you always have 3V of gate drive above Vd (and Vs).
This is an easy solution and probably the most attractive one.


Solution 3 reduces the button voltage range from ~= 0-5V to ~= 0-2V.
 If you have an ADC with 5V max range you are only using 2/5 = 40% of its range. Even at 8 bits with say 8 levels this gives you 2V/8 = 0.25V steps or 0.25V/5V = 1/20th of the ADC range per step. For an ADC with 8 bits and 256 levels that's 256/20 =~ 12 ADC steps / levels per button. Or you can consider the 1/20th of full scale per step to be 1/20 = 5% steps. 

To identify buttons correctly you must not vary by > 2.5% per step.
1% resistors are probably good enough for this albeit a bit marginally so if you got values at either end of the error range. As you are using all 1K resistors they (probably) all come from the same source so probably will not have a +/- 1% change between values. 



Implementation check:

Are the gate drive lines hard low when  not driving, or do they float?
You may have to add gate resistors to clamp the gates low/off/to ground when not being driven on.