You can use a free Samsung firmware update tool to get the Samsung SM-J510FN stock ROM from Samsung’s servers. Once you have downloaded the Samsung SM-J510FN firmware to your desktop, you can flash it with Odin.