ATmega dual pin function JTAG and analog input
I made meanwhile full testing and can answer myself.

Instead of thermistor I'm using MCP9700 active thermistor connected behind 4k7 resistor.

When JTAG is enabled then really all PF4-7 have pull-up resistors (even cable is disconnected) but JTAG communication is not affected by thermistor. ADC probably is working but probes JTAG TTL signals. Seems software JTAG detection is too complicated to get it working reliably.

Thermistor may be connected to any PF4-7 pin. I'm using TMS/PF5. 

When JDT is applied ADC can measure temperature. Just I must not forget to remove also JTAG cable.