10 USC 771
Except as otherwise provided by law, no person except a member of the Army, Navy, Air Force, or Marine Corps, as the case may be, may wear
(1) the uniform, or a distinctive part of the uniform, of the Army, Navy, Air Force, or Marine Corps; or
(2) a uniform any part of which is similar to a distinctive part of the uniform of the Army, Navy, Air Force, or Marine Corps.
=====
Not sure where the penalty provision is, or if there is one.