To be exact ....
Donald Trump said that he would encourage Russia "to do whatever the hell they want," if they did invade. So, you are right that he wasn't encouraging the invasion itself .... but he said much more than just that he wouldn't defend the country which was under attack. He also said that he would encourage Russia to do whatever it was they wanted after they had invaded. There is a small difference like you say, but it was still a threat ... and still reckless.
Beginning at the :30 second mark of the video and running until the 1:04 mark, Donald Trump says this :
"NATO was busted until I came along.
I said, 'Everybody's gotta pay.'
They said, 'Well, if we don't pay are you still going to protect us?'
I said, 'Absolutely not.'
They couldn't believe the answer.
They asked me that question.
One of the presidents of a big country said .... one of them said, 'Sir, uh, .... If we don't pay, and we're attacked by Russia, will you protect us?'
I said, 'You didn't pay? You're delinquent?'
He said, 'Yes.'
I'd say, 'If that happened? No. I would not protect you. In fact, I would encourage them to do whatever the hell they want.'
You gotta pay. You gotta pay your bills."
****************************************
****************************************
For the record, I do not believe that such a conversation ever took place. If it had, then Trump would have brought it up before now, and he would have specified who the president was.
This is classic Trump. He fabricates discussions, which he thinks make him look strong. He would tell us who he had specifically spoken to, if that alleged conversation had actually taken place. Trump loves to drop names. He is a bull $hit artist. In this instance, he got carried away and said some really stupid things. Trump is impulsive and can't keep his emotions under control. He is also dishonest and an egomaniac.