It is not illegal for a federal employee or anyone else, who is not subject to the Uniform Code of Military Justice, to travel to Nevada for the purposes of engaging the services of a prostitute in the counties of Nevada (Clark County where Las Vegas, Nevada is located is not one such county) where it is legal.
But, this is an offense under Article 134 of the Uniform Code of Military Justice applicable primarily to U.S. military personnel while serving in that capacity, even in cases where prostitution is legal under local law and the service member is not married.
Legal Prostitution In Nevada, In General
As another answer correctly notes that in Nevada:
Clark County, the county in which Las Vegas is located, has made
prostitution illegal. . . . You also can't do it in Reno (it's illegal
in Washoe County) and the nearby independent city of Carson City
(Nevada State Capital).
In fact, the law only permits counties with a population of 70,000 or
less to do it per county law. And before you ask, you can't go to
Rachel, Nevada (closest settlement to Area 51) for some
extraterrestrial ladies of the night as well as Lincoln County, while
qualifying for legalized prostitution . . . prohibits it.
Of the 16 counties in Nevada, only 10 allow prostitution, all of which
must be done through regulated licensed brothels only. Even then, only
8 counties have at least one active brothel in operation.
Civilian Legal Considerations In The U.S. Not Involving International Travel
It seems as if the concern of the original post might be with the Mann Act.
The Mann Act (also known as the White-Slave Traffic Act of 1910) is a
federal law that criminalizes the transportation of “any woman or girl
for the purpose of prostitution or debauchery, or for any other
This has been revised in a manner that, among other things, is now gender-neutral and limiting it to circumstances in which the act for which the prostitute is transported is illegal. It was the first federal human trafficking law in the U.S.
This act applies to transporting the prostitute across state lines, not the prostitute's customer.
Closer to the mark is the Travel Act:
The Travel Act or International Travel Act of 1961, 18 U.S.C. § 1952,
is a Federal criminal statute which forbids the use of the U.S. mail,
or interstate or foreign travel, for the purpose of engaging in
certain specified criminal acts.
But, since the travel would be for the purpose of an act that is legal at its destination, it wouldn't apply.
International treaties on sex tourism are inapplicable to domestic travel, and I don't try to analyze their applicability here.
None of these relevant laws treat military personnel or federal employees differently.
Prosecutions Under The Uniform Code of Military Justice
The Uniform Code of Military Justice provides an internal means of prosecuting military service members who are currently serving and a small number of other persons, via courts-martial, which are quasi-criminal proceedings with quasi-criminal punishments.
Article 134 of the UCMJ is its general provision which is a catch-all article barring anything "of a nature to bring discredit upon the armed forces", and also certain unenumerated offenses which are illegal under local law where the offense is committed, or under federal law. Article 134 encompasses many sub-offenses which are enumerated in the Manual For Courts-Martial but not in the statutory language of the UCMJ itself.
One of the offenses which the Article 134 of the Uniform Code of Military Justice (UCMJ) in the United States prohibits is adultery (which only a handful of U.S. states do and Nevada does not), so this would be an activity, if carried out, that would be subject to court-martial for a married member of the military who is currently serving in the military and thus subject to court-martial jurisdiction. Adultery prosecutions under the UCMJ are reasonably common even now.
(A lesser included offense of adultery under the UCMJ is "wrongful cohabitation" which is akin to adultery and bigamy but does not require a showing a sexual intercourse.)
Also, as noted in the comments to the question, while patronizing a prostitute is not a specific offense in the UCMJ in the statute itself, it is another offense that can also be prosecuted under Article 134. It has been DOD policy since at least 2006 to prosecute service members under Article 134 for engaging in prostitution, whether or not the service member is married, and whether or not prostitution is legal under local law. (Prostitution is not illegal under federal law other than the UCMJ.)
This is not obvious from the language of Article 134 of the UCMJ (which is codified at 10 U.S. Code § 934), itself, which states:
Though not specifically mentioned in this chapter, all disorders and
neglects to the prejudice of good order and discipline in the armed
forces, all conduct of a nature to bring discredit upon the armed
forces, and crimes and offenses not capital, of which persons subject
to this chapter may be guilty, shall be taken cognizance of by a
general, special, or summary court-martial, according to the nature
and degree of the offense, and shall be punished at the discretion of
that court. As used in the preceding sentence, the term “crimes and
offenses not capital” includes any conduct engaged in outside the
United States, as defined in section 5 of title 18, that would
constitute a crime or offense not capital if the conduct had been
engaged in within the special maritime and territorial jurisdiction of
the United States, as defined in section 7 of title 18.
But, the primary and authoritative interpretive authority for Article 134 of the UCMJ is the Manual for Courts-Martial, with the force of a law or validly adopted regulation. This indicates that prosecutions for pandering a prostitute under Article 134 does not require a showing that it is illegal to do so under local law.