Why does voltage not appear in the battery life calculation?
It does not appear in your equation because this equation assumes you're using the battery at its output voltage during the whole usage without conversion.

This is not the case here, because you're using a step-down converter. So, to build the correct equation you:


get Vavgbat: the average voltage of the battery during the whole discharge cycle: the discharge graph of the battery datasheet shows it's around 3.6V for the low currents, such as the one you use.
get Iavgbat: the current you'll draw from the battery, in average, during the whole cycle. It is not the current you use at the output of the DC-DC converter (that is where you missed something, I think). If we say the converter output current is Iout, then Iavgbat = (Iout * Vout / Vavgbat) / efficiency (efficiency being the efficiency of the DC-DC converter, usually around 80-90%, check the datasheet).
then you apply the forumla you mentioned: time = capacity / Iavgbat.


So you have: $$time = \frac{capacity}{Iout \frac{Vout}{Vavgbat}} efficiency$$

Now, you see the output voltage in the formula.

So, if capacity = 3.4Ah, Iout = 400µA and efficiency = 85%, we have:


time = 8670 hours (about one year) for a 3V output
time = 14450 hours (more than a year and a half) for a 1.8V output




One more thing: given the large times resulting, I think you have to account for the batteries self discharge (or leakage current), which may be significant. Unfortunately, I didn't see it mentioned in the batteries datasheet.



Additional detail: Where does the Iavgbat = (Iout * Vout / Vavgbat) / efficiency formula comes from ?

It comes from the fact a DC-DC converter, unlike a linear regulator, is able to output (almost) as much power as it draws from its input. So Pin = Pout / efficiency. If we say Pin = Vavgbat * Iavgbat and Pout = Vout * Iout, we can obtain the above formula.

On the opposite, with a linear regulator, the voltage is dropped without any consequence on the input/output current. So Iavgbat would be equal to Iout (not accounting for the quiescent current), which was your initial (inaccurate) assumption.