Xacro is released for all recent distros up to and including eloquent.
https://index.ros.org/p/xacro/#eloquent
You didn't clarify what installation method you used on Windows, but I'll assume that you didn't get one that included xacro, ROS 2 is a collection of packages and depending on what installation method you select you get different packages. And not all packages are bundled into the binary packages we built. The quickest way to add xacro is to put it into your source workspace and build it with your packages.
It's not yet released for Foxy If you'd like to see it released there please reach out to the maintainers probably the best way is to request a release on the issue tracker on it's repository: https://github.com/ros/xacro
If you use it from source and validate that it works, and or make any necessary patches it will help make it easier for the maintainers to respond quickly.
just making sure: Melodic is a ROS 1 release name.
Fixed, thanks!