I had a friend of mine go through something similiar to this when I was in the Marines. He ended up being retrained. He was a sheet metal tech. who completed his tech school only to find out that he was allergic to the metal on the aircraft he was assigned to.
I'd agree with the other 2 posters. I served with a boatswain's mate who was allergy to several types of hazmat related to topside preservation frequently used by the rating. She was cross-rated to OS.