Install Windows 10 or 8.1 on MacBook 4,1
I don't have personal experience with this but here's my best guess at the process


Get a 32-bit Windows 10 .iso. You can download straight from MS.
Use unetbootin or similar to create a bootable installer. Format for FAT32 under MBR (Master Boot Record)
You should now be able to boot to the Windows installer and install from there.


It should be mentioned that while macOS and Ubuntu are free software, Windows is not and you'll have to figure out a license.