The Highlands MP has said he will undertake diversity and inclusion training after making the comments.