NEW YORK — General Electric Co.’s NBC unit agreed on Monday to buy San Francisco-area television station KNTV from Granite Broadcasting Corp. for $230 million to expand into the fifth-largest U.S.