Female players had been considering striking in an effort to address wage discrimination.
The US Soccer Federation sued the players' union to prevent a strike that could have caused the team to miss the summer Olympics.
The judge ruled the players are not eligible to strike because of a provision in an earlier contract.
In March, five players filed a lawsuit with the Equal Employment Opportunity Commission alleging pay discrimination. They argued female players were sometimes paid four times less than their male counterparts despite holding the world title.
The players' union had not called a strike over the issue, but had been weighing the possibility.
The US Soccer Federation - the sport's national governing body- filed its own suit to prevent a strike. It argued a no-strike clause from an early collective bargaining agreement carried over to the 2013  memorandum of understanding that the players are currently working under.
The union argued that a no-strike clause had never been specifically laid out in the terms of the latest agreement.
However, the judge sided with the federation citing oral and email communication between the two sides, as evidence that the original terms were passed to the new agreement.
"A collective bargaining agreement may be partly or wholly oral and a written collective bargaining agreement may be orally modified," Judge Sharon Johnson Coleman wrote in her ruling.
The team is expected to perform well at the Olympic Games in Rio and the federation said it feared a strike would damage the development of football in US.
The players, many of whom have expressed outrage at gender pay differences, will continue their wage discrimination case.

Bernard Mensah struck a post for Aldershot after 11 minutes, but the visitors were a man down midway through the first half when Jim Kellerman saw red for a foul on Ross Stearn.
The Shots regrouped and took a deserved lead in the 42nd minute when Idris Kanu latched on to a through pass and poked the ball under Ryan Clarke.
But in the second half Eastleigh's extra man began to tell as they pushed forward and, with 10 minutes left, McAllister fired home from close range after getting on to the end of a flick-on.
That was enough to earn Eastleigh their first point in five outings, while Aldershot extended their unbeaten run to 10 games.
Report supplied by the Press Association.
Match ends, Eastleigh 1, Aldershot Town 1.
Second Half ends, Eastleigh 1, Aldershot Town 1.
Sam Matthews (Eastleigh) is shown the yellow card for a bad foul.
Sam Muggleton (Eastleigh) is shown the yellow card for a bad foul.
Substitution, Aldershot Town. Nick Arnold replaces Cheye Alexander.
Goal!  Eastleigh 1, Aldershot Town 1. Craig McAllister (Eastleigh).
Ayo Obileye (Eastleigh) is shown the yellow card for a bad foul.
Substitution, Eastleigh. Sam Matthews replaces Tyler Garrett.
James Constable (Eastleigh) is shown the yellow card for a bad foul.
Substitution, Eastleigh. James Constable replaces Ross Stearn.
Substitution, Aldershot Town. Shamir Fenelon replaces Bernard Mensah.
Second Half begins Eastleigh 0, Aldershot Town 1.
First Half ends, Eastleigh 0, Aldershot Town 1.
Goal!  Eastleigh 0, Aldershot Town 1. Idris Kanu (Aldershot Town).
Jim Kellerman (Aldershot Town) is shown the red card.
First Half begins.
Lineups are announced and players are warming up.
A judge has ruled that the world champion US women's football team does not have the right to strike.
[NEXT_CONCEPT]
Craig McAllister's late goal saw Eastleigh end a run of four straight defeats as they held the 10 men of high-flying Aldershot in a 1-1 draw.