The USB 2 specification allows 16 feet (5 meters)
You are at the outer limit, but it may be worth trying.
The other option is a USB wireless Print Server. Use that to connect the printer to your network.
USB Cable maximum length
The USB 2.0 specification limits the length of a cable between USB 2.0
devices (full-speed or hi-speed) to 5 meters (or about 16 feet and 5 inches)
Also
USB 2 lengrh
.
and
.
USB 3
USB 3.0 and USB 3.1 connection types have the same rating, and it’s a
bit of an oddball. In theory, there’s no actual “maximum.” However, if
you go beyond 3 meters (about 10 feet), your signal will start to
degrade. The longer you extend the cable, the lower the speed and the
less power it will provide. This gives you a little bit of wiggle room
if all you’re doing is sending a signal. For example, if you need to
send a security camera feed, a 20-foot run is probably doable,
assuming minimal interference. On the other hand, if that feed is a 4K
camera with two-way audio, you might have an issue. And if that camera
requires the USB cable for power, you’re definitely going to have
trouble.