In FreeBSD amd64 it’s not possible to install grub from ports. It’s only available for i386. So if your MBR was overwritten by other boot manager and you want to restore the freebsd one type as root in a terminal or console:
boot0cfg -B ada0
Replace ‘ada0’ with your unit if needed.