If you want to be a soldier for two years, if possible, I suggest you apply for suspension for two years first, and then report to your hometown armed forces immediately, so that you can catch up. After two years, you will leave the army and go back to your present school to continue your studies.
If you want to work longer, it depends on whether your school can do it.