Originally Posted by chippey5
fastboot flash boot boot.img
But OP stated their bootloader was locked.
If TWRP is still also installed on your actual recovery partition (so that you can still boot it after the next step), you can just
adb sideload <ROM.zip>
while TWRP is booted and you are connected to a PC to reinstall a ROM along with it's boot partition.
Another thing you could do if you have the partition at hand is to
while your phone running TWRP is connected to your PC and then
ls -lAh /dev/block/bootdevice/by-name/
Find out the actual partition of boot, in my case:
lrwxrwxrwx 1 root root 20 Nov 20 02:46 boot -> /dev/block/mmcblk0p6
So this is what i would try to restore the boot image:
dd if=<boot.img> of=/dev/block/mmcblk0p6
Good luck for everyone who still needed this after a year