Years? Far, far longer than that, I think.
A navy is not just a bunch of metal ships with guns. It is thousands of officers and crewmen who have experience at sea, who have been rigorously trained, who have mastered the complicated procedures of running a ship to the point that they can do them in their sleep, traditions centuries old that build up a sense of shared purpose and mission. The Royal Navy had that for about a quarter of a millennium. But it took literally generations to create and intense effort to maintain over the years.
If the Germans build these ships, where are they going to be allowed to cruise except in the confined spaces of the Baltic Sea? How are they going to gain experience? How are they going to weed out the excellent officers from the purely mediocre ones? The British are not going to allow them to do it, because they will do their best to sink any German ship that comes within the range of their guns and torpedoes.
The same problem that prevented the French from building up a navy to face the British during the Napoleonic Wars is going to plague the Germans during the Second World War, no matter what alternate history scenarios one dreams up.