The government officially confirmed yesterday what thousands of federal employees had been buzzing about for weeks - that President Carter has given the Forrestal Buildiing at L'Enfant Plaza to energy czar James Schlesinger as headquarters for the new Department of Energy.

The move involves some 5,000 Defense Department employees now occupying the buildings and around 8,000 Washington-area employees of the new Energy Department scattered at other locations.

Jay Solomon, administrator of the General Services Administration, which will carry out the move, made the annoucement.

The President's executive order, issued on June 3, called for "full availability" of the building by Oct. 1.

Solomon said, however, that only the seventh floor, which is designated as the executive suite for new Secretary of Energy Schlesinger, was likely to be ready by the President's target date of Oct. 1.

As for the rest of the move Solomon said, "It is GSA's anticipation that (it) will take at least several months to accomplish and possibly up to a year."

Officials had refused to confirm the move because they said they could not officially plan for an agency that did not exist. Then last Tuesday, Congress completed action creating the agency.

GSA and Defense Department officials said yesterday that details of the move - who will move where, when, and how much the move will cost - will be announced as the details are worked out.