Hi (quoting Application Form Guidance Notes from Navy:
for entry into the Naval service, you must meet the following criteria:
you must be a British, commonwealth, British protected citizen or an Irish national or hold a dual nationality with one of the fore-mentioned.
you must normally have resided in the UK or Ireland for a period of 5 years immediately prior to making an application. If you have not achieved this, do not worry as it will depend on where you have lived and the length of thine out of the country. Your CA will be able to advise you on the detail but it may affect the career or job you are applying for.
i hope this helps! If I were you I'd speak to your nearest AFCO for help. It's always worth trying to apply. Good luck!!