Bit of a trick question.
The last solely sail powered warship built for the U.S. Navy was the Corvette/Sloop USS Constellation, which was laid in 1853, and launched the following year. It's duties included wartime operations, suppression of the slave trade, diplomatic missions, flagship, and a sailor training vessel at the end of its life. It was decommissioned and struck in 1955, and is currently moored in Baltimore as a museum ship. Worth noting that she was built in part from materials salvaged from the frigate USS Constellation, which is one of the Navy's original 6 frigates.
The last sailing ship of the U.S. Navy is the USS Constitution. Laid in 1794, and launched in 1797, the Constitution is the oldest commissioned naval vessel afloat. Having served with distinction throughout the 19th century, she is the last surviving of the 6 frigates originally authorized by Congress. Today the Constitution is permanently moored at the Charlestown Navy Yard in Boston - near where she was originally launched - though it is currently in drydock for refit. The Navy Yard is part of the National Park Service's Boston unit, though the ship is still manned by active duty Navy personnel.
Also, sails held over during the screw steamer age - though I am having a hard time finding the final one commissioned/decomissioned.
In addition, the Navy did commission sail training vessels, such as the (hermaphrodite) brigantine USS Boxer (1904) as late as the early 1900s.
Also, the U.S. Coast Guard still operates the USS Eagle, a steel hulled barque taken in 1945 as a war prize from Germany. Today, the Eagle is based out if the USCG Academy in New London, Connecticut. All cadets undergo sail training on board.
So for the most recent USN ship built with the ability to supplement her engineering plant with sails it looks like the answer is the Denver class cruisers.
Characterized as "Peace Cruisers" these light protected cruisers were meant mostly as station ships to show the flag and conduct long ranged patrols. They were authorized in 1899 and the final 3 were launched in the summer of 1903.
USS Galveston, Tacoma, and Denver all show sail rigs fore and aft though I can't find any of them actually in use and they were all removed within the next decade.