American reactions could go either way --
Monroe Doctrine is not quite immaterial here. The US had a non-trivial navy, especially compared to Prussia, in 1864-1865. The US reaction to the French adventure in Mexico offers hints that an American reaction could have been anywhere on a scale of 1 to 10.
Outline of History, Volume II
“But in April, 1865, the civil war in the United States was brought to an end, and the little group of eager Europeans in possession of Mexico found themselves faced by the victorious United States government in a thoroughly grim mood, with a large, dangerous-looking army in hand. The French imperialists were bluntly given the alternative of war with the United States or clearing out of America. In effect, this was an instruction to go. This was the entanglement which prevented Napoleon III from interference between Prussia and Austria in 1866, and this was the reason why Bismarck precipitated the struggle with Austria.”
Based on this, one could surmise there would be American hostility to Prussia’s move into the West Indies (and even Greenland)
So, Prussia opts to exchange northern Schleswig for the Virgin Islands and Greenland in October 1864 (the historic end of the Danish War) as a sop, primarily to assuage the feelings of the Russians, historic friends of Denmark. To a degree this may assuage the feelings of historically pro-Danish Britain also, and France‘s favor of the national principle.
An alternative time for the Prussians to work out the exchange is August-September 1865 after the Convention of Gastein gives undisputed Prussia sovereignty over Schleswig.
Domestically, Bismarck Wilhelm accedes to all this most of all to stay on a good footing with Russia and secondarily as a sop to Prince Adalbert, an advocate of colonialism and navalism.
(I checked wiki and the Danes had given up on all their African or Indian Ocean colonies at this time by 1850.)
A) More likely (if the already unlikely colonial acquisition happened) is that the United States decides to take little official notice, based on the “one war at a time” principle.
The U.S. avoids conflict with Prussia because first it is fighting a war, secondly because even after the war it is war weary, and thirdly it is concerned about alarming or provoking a European coalition between Prussia and more dangerous powers like England, France or Spain..
Also, the Virgin Islands are more distant than Mexico and therefore less important to clear of European influence than Mexico. Even in OTL, although the US strongly opposed the French involvement in Mexico, Washington resorted to intimidation and proxy war by supporting Juaristas, not direct war. It also did not make an ultimatum for instant withdrawal, rather it gave the French about two years to retreat from Mexico. Getting on Prussia’s bad side, on the other hand, may strengthen the French position and stubbornness over Mexico.
Assuming the US lets the territorial transfer stand,the French might seize the Virgin Islands in 1870, and then be forced to return them in the peace treaty. Or the French might hesitate and the US might voice displeasure at the prospect.
German possession of the Virgin Islands only becomes a sore point after some period of time, not till the late 1870s. At that time, there is even less America can do about it than in the mid 1860s.
As Mike Stone suggests, the Germans may exchange the Virgin Islands to Britain for Heligoland, and retain a greater stake in East Africa (especially in Witu on the southern coast of Kenya). If they agree to this, it does violate the presumed non-transfer principle, but since it is to Britain, America would/could not contest it.
Another possible exchange would be the granting of all the Virgin Islands to the US in 1889, or 1899, in exchange for yielding all American claims over Samoa to Germany, so all of Samoa ends up as a German or New Zealand dependency over the long run.
If the Germans instead retain the Virgin Islands up to the beginning of the Tirpitz era, they would become a disturbing (to America) naval base, giving Germany more options in the Caribbean.
B) The alternative is the United States making a big protest over transfer of the Virgin Islands (and possibly Greenland), perhaps to the point of fighting.
If the U.S. takes this line, either in late 1864*, or in 1865, it would be because Seward demands it and Lincoln or Johnson agree, they feel victory is in the bag in the Civil War, believe confrontation with Prussia can be a unifying force and feel that Prussia is so negligible a naval factor it cannot threaten the U.S., aid the Confederacy, or even defend the Virgin islands should it come to a fight. The U.S. in this case calculates it can intimidate the Prussians into withdrawing, and that this will encourage the French and Spanish to be cautious and withdraw from American republics as well. It is safer to threaten the Prussians than the more formidable French or Spanish.
This calculation could work out, or not.
*what was the timeframe of the 13th amendment debate? Lincoln, nor Seward, want to endanger that or distract from it. The Democrats may be the ones to play up the Prussian menace.