Filament type should have nothing to do with the issues you are facing. This is a mechanical issue or a slicing/scaling issue. The hotend should, if instructed to go to 20 mm height actually go to 20 mm (it did do that before!), it cannot "lose" 2 mm on the way up unless you have a lot of lost steps (e.g. too much load on the carriage pressing it down, but that seems pretty unlikely). Typical variations for Z are in the order of a few tenths of a mm for a properly dialed in printer.
Please note that the Z axis is usually controlled by a leadscrew (your printer type and brand is not known, but if you have a Prusa style printer or some sort of a cube you'll have a leadscrew, Delta's have belts), so once you dialed this in, the head will go to the instructed height.
Reasoning to your observations: If it was under-extrusion because of lower diameter filament, the last few layers should have been falling out of the hotend (considering the head goes to 20 mm and the print is 18 mm high). This is not the case; you have not described that kind of behavior.
The most likely problem is a slicing or scaling problem.
The answer to your question is therefore: "No you do not need to calibrate the Z height.". But when changing to another filament you could calibrate the extruder for this new filament; if the diameter is not far off you do not need to do that, but you could if you are into details.
Preferably questions like these need to include a picture of the print and the printer type!