Love is the death of duty.
Jon and Tyrion discussed this quote from Maester Aemon. For Jon, it meant that he had forsaken his duty (acting in the best interest of the Realm) because of his love for Dany.
Tyrion then adds that duty can be the death of love. In order words, if Jon wants to do his duty, he must put his feeling of love aside. Quite literally, Jon's rightful duty would be to kill the woman he loves, since she is an active threat that cannot be stopped.
Killing Dany was in the best interest of the Realm, and Jon has unwaiveringly acted in the best interest of the people he represents: the Starks, the Night's Watch (and thus also the realm of men), the North.
When Jon killed Dany, he put aside his personal feelings and acted in the best interest of the people he swore to defend. Because Dany would have remained an active threat.
While Jon may not have understood Dany's statement, don't forget that in her victory speech, she specifically mention "liberating" Winterfell. That puts Jon in a strong conflict. The woman he loves threatens everything else he stands for, and he had to make a choice.
He chose duty over love. Because he couldn't prevent Dany from waging eternal bloody war.