This is not my field but I did have a relationship with FBI recruiters when I worked in career services and had the opportunity to visit their offices in Miami which was pretty cool! I found a link to an article that might answer your question: https://www.howtobecome.com/how-to-become-a-detective. It says it "Becoming a police officer requires about six months of training, and officers must typically gain four or five years or experience before they can take a promotional exam to become a detective. Some police departments allow officers to substitute a college degree for a year of experience". I think this also depends on what type of detective you want to become and for what agency. I want to say it may take more time depending on the level of expertise you are looking to attain. Hope this helps!