Dating is not illegal. Having sex is! Although a 16 year old can consent to sexual activity, the law prohibits a 16 or 17 year old from having sex with someone 24 or older.
Also, I would advise to be very cautious about activity that does not fall under the category of "sex", such as "heavy petting" and other types of sexual conduct that does not fall under the traditional category of sex.
Today's generation does not see sexual activity in the same manner as past generations, but the law is clear. Nevertheless, the most prudent approach should be just to wait under the 17 year old turns 18, because the "victim" is often not the one that complains to law enforcement - it is the parent.
Best of luck