The Prince George's County Council, which spent several years debating where to build a new jail, learned yesterday that the cost of construction is a bigger problem than is location.

The county has $5.5 million to build a new jail, but needs an additional $18.5 million, corrections department director Arnett Gaston told the County Council. Of the $18.5 million, half would come from the county, and the other half from the state.

Council members reacted with surprise.

"It's ridiculous that we didn't put something on the ballot to get bonds approved" for the jail's construction, said member William B. Amonett. "Why weren't we told about this before the last election?"

Gaston said the council was told about the cost, but apparently did not realize that the county's construction funds were insufficient.

While the politicians worry about sources of funding for the new jail, the existing detention center in Upper Marlboro is overcrowded. The facility has about 530 inmates, but was built to house only 140. The inmates are "doubled up," with about 80 sleeping in each wing instead of 40. Some sleep on the floor of the gym or cafeteria.

Several years ago, prisoners in the jail filed suit against the County Department of Corrections, charging that their civil rights were violated by the overcrowding. The suit will be heard in June by a federal judge in Baltimore.

"In the past, the courts have not allowed insufficient funds to get in the way of prisoners' civil rights," Gaston told the council in urging them to find the money to build a 440-bed facilty.

Council members said they would explore these alternatives to raise the money: giving taxpayers a small cut in taxes than previously planned, cutting programs, or putting a referendum question on the ballot in 1982 so the county would finance the construction costs with bonds.

County Executive Lawrence J. Hogan had no answers to the problem of financing a new jail. But he questioned whether the county should build a jail as large as the one proposed by Gaston.

"If the state would keep its prisoners, we wouldn't need as many beds," Hogan said.

Hogan is hoping that the state legislature will authorize construction of a new state facility to relieve some of the overcrowding in the county jail.