If a person likes a girl and chat with her on social media for the purpose of understanding her to get married in future and he is not involved in any kind of sin by this chat. Is it permissible?

If the said conditions and restrictions are applied, then it is permissible.
However, this should not take long time.