Take real numbers

    k = 9.; l = 12.; m = 2.; M = 4.;
    mat = {{m*w^2 - 2*k, k, k*Exp[-3 I*ka]}, {k, M*w^2 - (l + k), 
    l}, {-k*Exp[-3 I*ka], l, M*w^2 - (k - l)}};
    mydet = ExpToTrig[Det[mat]];
    sol = Quiet@Solve[mydet == 0, w];
    funcs = w /. sol // FullSimplify;






Use for the real part

    Plot[1/2 Flatten[funcs + Conjugate[funcs]], {ka, 0, \[Pi]}]

and

    Plot[1/2 Flatten[(funcs - Conjugate[funcs])/I], {ka, 0, \[Pi]}]

for the imaginary part.