An elderly widower who engaged in sexually explicit online chats with a 14-year-old girl has avoided jail after being shopped by a family member.