I do not know about the legality of your situation. Non-sexual dating is not illegal (that includes no kissing, no nudies, etc). Though, they might still make problems and just assume you guys are having sex.
The actual legality depends on the age of consent where you live. There are plenty of countries and states where it is actually legal.
Whether it's smart or not... probably not. Speaking from experience here. I was dating a 15 year old girl at 27, who I had known for many years and we were very close friends. She was into me for a long time, I eventually fell for her. Thinking about it for ages I eventually decided to go for it. I wasn't sure if it would be smart, but I figured I'd take the chance.
The experience hasn't been great. What I can tell you is that there is a huge difference between friendship and dating. When you date someone you tend to get to know them better, their expectations and everything. And then it's likely you'll find out the expectations are entirely different, and those things make it not work out well.
Not to mentions she'll likely respect you more if you wait till she's 18 and more mature.
My advice, ride it out for now. Wait till she's 18, if you still feel the same way you can admit your feelings and perhaps it will lead somewhere. And, maybe in that time you'll find someone else, or she'll find someone more age appropriate.