If you introduce them clearly as two different characters, you probably won't encounter any confusion. However, it may be distracting for some readers, and depending on how they are introduced some name-savvy readers may be waiting for the other shoe to drop (waiting for the reveal that they are actually the same person, or that they were both named after the same Nicholas or similar). If it isn't clear that you are aware of the potential common origin of the names, you will likely also irritate some readers.
This will depend to some extent on your audience. Parents actually do that kind of thing with names all the time, so it wouldn't be unrealistic. However, absent some narrative explanation for the gaffe, I would scoff at your lack of naming knowledge if I ran across such brothers in your novel, just as I (secretly) roll my eyes at parents who name their kids Liz and Beth. I might even take it as a general sign of carelessness on your part. I see Cole recommended as a nickname for Nicholas pretty regularly (see, e.g., Nameberry, The Bump, BabyNameWizard, WhatToExpect, etc.), so it's not an obscure connection.
I once actually stopped reading a "historical" novel which had a Victorian Irish American family with sisters Margaret and Megan (Megan being a Welsh nickname for Margaret that was virtually unknown as a given name in the US until the 1970s), and that error was part of my scathing anti-recommendation of the book. I know other folks who feel the same way about character names, so if you have reason to believe that a significant part of your target audience might be knowledgeable about names (e.g. if you're aiming your book at women who are in a child-naming age range) you might want to reconsider, or give some explanation for the parents' cluelessness.