
Yes, there was an ancient city in northern England called York, still is—The English needed to mark their territory in 1664 when they grabbed—New Amsterdam from the Dutch—King Charles II handed the territory to James—the Duke of York, his brother.
James never set foot in the place, but his title became the new name for the city—a royal branding exercise, plain and simple.

The Dutch had run the place since 1624—called it New Amsterdam. With streets and canals set in their sensible Dutch manner—they had developed it into a bustling port town.
The English took it without firing a gun—they simply sailed four ships into the port and made an offer the Dutch governor could not refuse.
The English gave everything new names—New Amsterdam grew to be New York. The province around it became New York too—anglicized even them old Dutch street names. Breede—Weg became Broadway.
The Dutch character of the city stayed though—in its merchant spirit and tolerance for different peoples.

The irony is that York, the English city it was named after, was already ancient when New York was born—It was founded by the Romans in 71 AD, named Eboracum. The Vikings later called it Jorvik—which became York.
Assuming that we’re talking about the city and not the state, New York, or the area on which New York sits has had several names.
Giovanni da Verrazzano, probably a Florentine in the French service, named the area around the bay of the Hudson river, Nouvelle Angoulême in 1524. In 1609, Henry Hudson, sailing on behalf of the Dutch East India Company recorded that the Lenape tribe had settlement called Manna-hata (the origin of Manhattan) and claimed the area as Nieuw-Nederland.
In 1625, the Dutch built a fort known as Fort Amsterdam on Manhattan Island and the settlement that grew up became known as Nieuw Amsterdam or New Amsterdam.

Nieuw Amsterdam in context
On the 12th of March 1664, King Charles II granted the territory between the Delaware River and the Connecticut River to his brother, James, the Duke of York, based on a royal charter given to the Virginia Company in 1606.
This grant included the area of New Netherland which the British professed to believe the Dutch had no claim to and, on August the 27th 1664, four British frigates under Colonel Richard Nicholls sailed into the harbour and demanded the surrender of the New Amsterdam, which was duly given without resistance.
In 1667, the settlement formally became British under the Treaty of Breda and was renamed New York after the aforementioned James, the Duke of York (probably because Jamestown was already taken by the settlement Virginia – itself named after Elizabeth I, the Virgin Queen).

James, Duke of York (later James II)
James was formally created Duke of York in 1644, by his father, King Charles I. The title of Duke of York is historically associated with the second sons of English monarchs, and was first granted to Edmund of Langley in 1385, the founder of the House of York (Wars of the Roses, etc).
There are, apparently 35 places called York in the world, including 23 in the United States (not counting New York) but these all stem from the original York in England.
The city of York was established in 71 AD by the Romans, who named it Eboracum possibly from an existing Celtic name meaning place of the yew trees. Eboracum became an important military and administrative centre in Roman Britain, serving as a military base, the capital of the Roman province of Britannia Inferior, and as an occasional residence for Roman emperors, such as Hadrian, Septimius Severus and Constantine (who was proclaimed Emperor in York in 306 AD).
After the Romans withdrew from Britain in 410 AD, the urban population declined and the city fell into disrepair. At some point, between the 5th and 7th Centuries, the Anglo-Saxons renamed the city Eoforwic, possibly because ebor sounded like eofor the Old English for boar.
Adding wic or place to the name it became the place of the wild boar. Originally in the Kingdom of Deira it became part of the Kingdom of Northumbria in the 7th Century.
Then, in 866 AD, the Vikings, led by Ivar the Boneless and Halfdan Ragnarsson, captured Eoforwic and established it as the centre of the Viking kingdom of Jórvík (roughly speaking modern Yorkshire). The city became Jórvík in Old Norse.
In those days, the nation of the Northumbrians had violently expelled from the kingdom the rightful king of their nation, Osbryht by name, and had placed at the head of the kingdom a certain tyrant, named Alla. When the pagans came upon the kingdom, the dissension was allayed by divine counsel and the aid of the nobles. King Osbryht and Alla, having united their forces and formed an army, came to the city of York; on their approach the multitude of the shipmen immediately took flight. The Christians, perceiving their flight and terror, found that they themselves were the stronger party. They fought upon each side with much ferocity, and both kings fell. The rest who escaped made peace with the Danes.
Simeon of Durham
York changed hands multiple times after 866, and the last Scandinavian Earl of Northumbria, Sigurd the Stout, didn’t die until 1055.

After the Norman Conquest, the city was referred to as Euruic in the Domesday Book. Over time, the name evolved, becoming Yerk in the 14th century, Yourke in the 16th century, and even Yarke in the 17th century.
However, the form York was first recorded in the 13th century and so the city of New York inherits its name, via the Duke of York, from York in England, one more step for a name with a long and storied history.