You can do that but you have to keep being a lpr till oath. Therefore, if it takes longer than 6 months. You need to go back USA and wait there. LPR can't live more than 6 months per year away of US.
When it is not military takes more than a year applying for 319b