"Ini bukan sebuah jantung, melainkan sebuah otak."
Basically the same, no grammatical errors, still got the cross mark.
-Kay, Indonesian native speaker
Yes you can use Melainkan, but I think the other answer uses Kuku "Nail" instead of Otak "Brain"
heart also can be HATI, instead of just JANTUNG.
Ini bukan hati tapi otak
Is there a difference between hati and jantung, and hence why hati is not acceptable here? I previously learned heart as "hati".
Jantung is used when speaking anatomically or physically about the heart, like in the sentence: ini bukan jantung, tapi otak.
Hati is used when speaking emotionally about the heart. For example: hatiku milikmu -> my heart belongs to you.