You will definitely want to include the word "being" in your sentence. Thus, you would write:
Friend, thank you for being niceSomething that might sound a bit more natural is:
(Dear) friend, Thank you for your __________.Fill in the blank with kindness, thoughtfulness, hospitality, or any other adjective that you may find decribes your friend's consideration.
Student or Learner