If you want to say "I decided to study," we say "勉強する ’こと’ に/を決めた". It needs 'こと', it's similar to "decide + 'to' +verb". You can use both に and を in this case.
There are many differences between を and に. But the biggest one is, "に" stand for the goal, on the other hand "を" stand for the way point. So, when you say "電車を降ります," you alight "from" a train. You don't alight "onto" a train. The other way around, if you want to say "I went to school," you can't say "わたしは学校を行った" because you go toward school, don't pass through.
There are many difficult subtle differences in Japanese post-positional particle. Even Japanese often make a mistake...
I'm sorry that my English is not good enough...