you are fine if you are still on J1 status when your 485 is denied. if you are on AOS, you have to leave the nation.