That is very normal, especially at your age. Being 16 there is a lot going on in your life, you are changing and growing up, school is getting more serious, there are new interests in your life, social life is usually peaking. At this time in our lives it is natural to take an interest in many things (often too many) this is how you learn what to fill your adult life with. So you won't always be able to keep and clear and motivated mind.
The main key to keeping motivation up is to set clear and realistic goals.
Set long term goals - What do I want to achieve our of gymnastics by the end of high school? ie college scholarship? Hit level 8, 9, 10? Compete at a state, regional national level? etc
Set mid term goals - what do you want to achieve by the end of the year? Competition wise? Skill wise? Level wise?
Set short term goals - what do you want to acieve in the next few months?
And each practice set training goals - what do I want to achieve and improve today?
Gymnasts with strong goals work harder and get more out of each training session than those without clear goals.