Both are correct. In the first, the noun "study" is the object of the preposition "of". In the second, the object of the preposition is the gerund "studying".
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.