i only get heat when i accerlate on 2001 Nissan Xterra

i replaced the thermostat the heat censor and put all new antifreeze in the system

3 answers
Possible air in system, low coolant level, defective water pump impeller or restricted heater core. Does the temp gauge go up when at idle for an extended time?
I agree with wetry ,I would try bleeding the system first
or blend door issues