I know it's a bit late but I had a similar problem and this solved my problem (source: https://www.davidschlachter.com/misc/ker...). My kernel task CPU was 300+% all the time and the fan would start whirring seconds after I turn the computer on, and continue the entire time it was on. Everything functioned, but loaded at a snails pace and the computer was essentially almost unusable for anything practical. I hadn't downloaded anything recently or replaced any parts or done anything to trigger any changes at all so I was confused. The article I linked above saved me though, so check it out, maybe it'll help you too.
I'm super bad with computers and honestly don't even know what a hard drive or CPU is, so deciphering that article took a lot of time. So I made a dumbed down version below for anyone like me experiencing the same problem. If you get computers, just read the source article linked above.
Basically what I did is (I have a Yosemite Macbook air, but if you have El Capitan or later version, you need to disable SIP before doing the below steps):
Shut down computer.
Hold down Command-S immediately after pressing the power button when turning the computer back on. Keep holding until a bunch of white text on black background appears.
When the white text finishes scrolling enter:
fsck -y; mount -uw /
then hit return (always hit return after every line of input you make; also make sure everything you input is EXACTLY what's here, including the spaces and stuff)
Second line, enter:
rsync -av /System/Library/Extensions/IOPlatformPluginFamily.kext /Users/Shared/
(That's all one line, no "returns" inside it, only spaces...after inputting this line, a whole bunch of text scrolls past so wait a bit)
Third line, enter:
rm -rf /System/Library/Extensions/IOPlatformPluginFamily.kext;
(That again was one line with no "returns", only spaces to separate the sections of the line)
Last line, enter:
shutdown -r now
After that shutdown line, the computer starts up again and the fan keeps on whirring loudly. But if you go to Activity Monitor (find it using Spotlight) and look at the CPU%, kernel_task should be way down. For me, it was down to 1% within 5 minutes (it was 300%+ before) and the computer works a lot better (fast).
Basically the fan should still be loud but your computer should be much faster.
As noted by the original author of this solution, I don't know if this harms the computer but nothing has happened yet to mine and it's been an hour. The original author even updated his post a few days after he originally did all the above and noted that the fan stopped whirring loudly. He then restored the kext that the above process served to delete and the computer stayed normal (to restore the kext, use rsync -av /Users/Shared/IOPlatformPluginFamily.kext /System/Library/Extensions/ in the same white text black background place). Basically the computer was completely back to normal!
Hopefully this helps somebody out. For me right now, the fan's loud and annoying still but things load fast (I could barely type before) so I'm happy. I'll update if my computer explodes or something.