I am 17 is there any medicine that can solve premature ejaculation permanently?

Time. Learn to relax and take it easy. Don't focus so much on sexual performance at your age. Ig generally gets better. If it persists, check w/your doctor for a work-up. There are medications which can help, but you're far too young to start taking chronic medication for a problem that can resolve spontaneously. Remember, there's more to being sexual that an an ejaculation.
Understanding mate. Premature ejaculation is due to performance anxiety, an understanding partner who is supportive is helpful. To get rid of performance anxiety, ironically you should, perform as much or as many times as possible. Ssri medications have known to helpful as they prolong ejaculation time.