Just about every Linux distro has the option to natively run headless, even consumer-oriented distros like Ubuntu will let you boot without any GPU connected (even Windows will). Doing some further research, it appears that many Mac Desktop's will not let you boot without a monitor attached (not sure if this applies in your case).
I'm not sure exactly why you want to use a distro without a GPU, as you will most likely have no display outputs. If you are only interested in recovering the data, you will most likely have a "Target Disk Mode" allowing the files on the Mac to be detected as an external drive without needing anything attached to it. To do this, attach a cable between two Mac's (or possibly another computer with a compatible port) and hold
T while booting.
If you still want to install the distro headless however (for server use, etc), there is this installation type called "No Questions Asked", which will install Ubuntu without having to ask any questions, as the name implies. Not sure how this exactly works, but it may be worth a try.
Finally, if you are confident in opening up your MacBook, espicially an older MacBook which you have, that is usually much easier to take apart. It may be worth to remove the storage medium instead. If you have a spare computer, you can install Ubuntu (or any other distro) using the normal method to this drive and then putting it back in the MacBook. It is definately a pain, and usually not preferred, but it may be your only way.
Thank you for using the Ask Ubuntu for asking your questions.