If you have applied through proper channel for the post of State Forest Department, then there would be no problem in tendering technical resignation and joining the new position.
However, most probably you had to sign a bond while joining Indian Army and the bond period is not yet over (you have served for 7 years). In that case, it would be difficult for you to join the new post. Even if you are allowed to leave Army and join State Forest Department after special consideration, your bond will be transferred, and you will be required to spend the residual bond period in the new Government Office.
"If you are killed in action, you go to Heaven. If you win, you rule this Earth (as beautiful as Heaven). That is why, O son of Kunti, take a firm resolve and fight!"-- Shrimad Bhagwad Gita